Cross partition query is required but disabled
See original GitHub issueHow do I fix this in my query? Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to true, specify x-ms-documentdb-partitionkey, or revise your query to avoid this exception
const querySpec = { query: "SELECT * FROM c WHERE c.documentId = @documentId", parameters: [ { name: "@documentId", value: documentId } ] };
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
CosmosDB: Cross partition query is required but disabled ...
Enabling or disabling cross partition query in the CosmosDB settings (using Azure, data explorer) doesn't resolve the problem. [bug].
Read more >c# - Cross partition query is required but disabled trouble on ...
Hi, what about adding new FeedOptions { EnableCrossPartitionQuery = true }?. – Prasanth V M. Sep 12, 2017 at 13:32. 3.
Read more >Cross partition query is required but disabled. Please set x-ms ...
I have a Azure Cosmos DB container in Azure partitioned by 'ticker'. I am using the python SDK to try and make a...
Read more >Problem writing to Azure Cosmos DB - FME Community
The message from the server is: 'Cross partition query is required but disabled. Please set x-ms-documentdb-query-enablecrosspartition to ...
Read more >Mahesh Sabnis on Twitter: "@rimmanehme Can you help me ...
Can you help me on BadRequestException: Cross partition query is required but disabled.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sorry, found the answer already. const { result: results } = await container.items .query(querySpec, { enableCrossPartitionQuery: true }) .toArray();
Closing.
This just helped me fix my problem, thanks!