Search code examples
azureazure-cosmosdbazure-cosmosdb-mongoapi

How do you perform queries without specifying shard key in mongodbapi and how do you query across partitions?


How do you perform queries without specifying shard key in mongodb api and how do you query across partitions?

In sql api the latter is enabled by setting EnableCrossPartitionQuery to true on the request but I'm not able to find anything like that for the mongodb api. And my queries that work on an unsharded collection now fails(queries that specify the shard key works as expected).

The queries fail indiscriminately of whether I use the AsQueryable extension syntax or the aggregation framework.


Solution

  • Was confirmed a bug by the Product Group team! Will be fixed in first two weeks of september in case anyone runs into the same problems in the mean time.