Any idea why when I execute the query below in Cosmos DB using the rest api I get the error below? The same query without the order by works fine...
I have set the header "x-ms-documentdb-query-enablecrosspartition: True" in both cases and I am using PHP to make the requests.
MULTI PARTITION QUERY THAT WORKS:
SELECT c.id, c.name, c.age FROM c where c.age = 30
MULTI PARTITION QUERY WITH ERROR:
SELECT c.id, c.name, c.age FROM c where c.age = 30 order by c.age asc
ERROR:
Client error:
POST https://yeapp-cosmosdb.documents.azure.com//dbs/-JJZAA==/colls/-JJZAL+WPKw=/docsresulted in a
400 BadRequestresponse: {"code":"BadRequest","message":"The provided cross partition query can not be directly served by the gateway. This is a (truncated...)