I suspect that request calls, currently done with the client does not represent real view:
First call should be to /dbs/{database}/colls/{name}/docs
with
x-ms-cosmos-is-query-plan-request: True
which will return something like this:
{"partitionedQueryExecutionInfoVersion":2,"queryInfo":{"distinctType":"None","top":null,"offset":null,"limit":null,"orderBy":[],"orderByExpressions":[],"groupByExpressions":[],"groupByAliases":[],"aggregates":["Count"],"groupByAliasToAggregateType":{},"rewrittenQuery":"SELECT VALUE [{\"item\": COUNT(1)}]\nFROM OpenShiftClusters AS doc\nWHERE ((NOT (doc.openShiftCluster.properties.provisioningState IN (\"Succeeded\", \"Failed\"))) AND ((doc.leaseExpires ?? 0) < (GetCurrentTimestamp() / 1000)))","hasSelectValue":true},"queryRanges":[{"min":"","max":"FF","isMinInclusive":true,"isMaxInclusive":false}]}
Call should be to get app parition keys:
GET to bs/{database}/colls/{name}/pkrange
where it will return:
I suspect that request calls, currently done with the client does not represent real view:
/dbs/{database}/colls/{name}/docs
withwhich will return something like this:
bs/{database}/colls/{name}/pkrange
where it will return:Where
id:0
should be used asx-ms-documentdb-partitionkeyrangeid
with therewrittenQuery
from 1st.@jim-minter, ideas?