I'm using the .NET Core Cosmos DB Client NuGet package Microsoft.Azure.Cosmos v3.4.4
I need to query across partitions, but I haven't found how to do this like FeedOptions.EnableCrossPartitionQuery
as described in the following article
https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-query-container
How do I enable cross partition queries?
Cross partition queries are enabled by default in V3.
If you do specify a PartitionKey
in the QueryRequestOptions
, it becomes a single partition query.
Source code reference
https://github.com/Azure/azure-cosmos-dotnet-v3/issues/731
The v3 SDK sets the EnableCrossPartitionQuery automatically based on the query and QueryRequestOptions.PartitionKey value. There is no need to set it in v3.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With