When executing the following query I receive an error
select * from c order by c.Agent.LastStateChangeUnixTime desc,c.Priority asc
The order by query does not have a corresponding composite index that it can be served from
I have added a composite index as stated in the documentation here and here
Is my composite index wrong? Or am I missing something else?
My index settings are:
{
"indexingMode": "consistent",
"automatic": true,
"includedPaths": [
{
"path": "/*"
}
],
"excludedPaths": [
{
"path": "/\"_etag\"/?"
}
],
"compositeIndexes": [
[
{
"path": "/Priority",
"order": "descending"
},
{
"path": "/Agent/LastStateChangeUnixTime",
"order": "ascending"
}
]
]
}
Example Object:
{
"Agent": {
"TenantId": 999999,
"PrimaryState": "Null",
"PendingState": "Null",
"LastStateChange": "2020-01-18T05:48:11.5397269+00:00",
"LastStateChangeUnixTime": 1579326491,
"Notes": null,
"AgentId": 123,
"id": "agent-123"
},
"AgentId": 123,
"SkillName": "English",
"id": "SkillName123",
"Priority": 10,
"_rid": "SVIMANKqJboCAAAAAAAAAA==",
"_self": "dbs/SVIMAA==/colls/SVIMANKqJbo=/docs/SVIMANKqJboCAAAAAAAAAA==/",
"_etag": "\"2200819a-0000-0700-0000-5e229c1d0000\"",
"_attachments": "attachments/",
"_ts": 1579326493
}