I am currently - who guessed it - facing a conceptional missunderstanding, how can you provide an API service with a sort feature, using mongoose@4 and CosmosDB@MongoAPI4.0. The API service is consumed by users/frontend and third-party API services in a cloud environment.
As I know, whenever you sort multiple fields, CosmosDB requires a compound index. I read the past 2 days Microsoft Azure Cosmosdb documentation from front to back about this topic.
As you see, the frontend supports a multiple choice between specified columns, namely properties of the underlying schema translated for user convenience.
How do You support such a simple requirement with CosmosDB? Do I add every, single, combination out of these for about 10 collections in my DB?? I highly doubt this concept in my head, so I ask you, lovly SO for help.