Chris Buley Thank you for clarifying this. Yes, the indexing policy you’ve provided aims to sort the entries in your Azure Cosmos DB container by the “creationDate” value in Oldest to Newest order. { "automatic":true, "indexingMode":"Consistent", "includedPaths":[ { "path":"/*" } ], "excludedPaths":[], "compositeIndexes":[ [ { "path":"/creationDate", "order":"ascending" } ] } Manage indexing policies in Azure Cosmos DB Regards, Oury
Azure Cosmos DB container sorting of records
Chris Buley
71
Reputation points
Hi everyone,
We have an Azure Cosmos DB container that gets populated with batched entries and currently they get sorted by the "c_ts" JSON value. I would like them to be sorted by "creationDate" value in Oldest to Newest order.
Is there a way I can do that, maybe with the Indexing Policy for that container? Kind regards Chris.
Accepted answer
-
Oury Ba-MSFT 19,101 Reputation points Microsoft Employee
2024-02-21T18:26:33.3233333+00:00