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
156
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.
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,901 questions
Accepted answer
-
Oury Ba-MSFT 20,911 Reputation points Microsoft Employee Moderator
2024-02-21T18:26:33.3233333+00:00