In release 2.4.0 CompositeIndexes can now be defined for collections. I am unsure how to leverage these with the LINQ interface.
For example, with the composite index for Foo and Bar I would have the following indexing policy:
{
...
"compositeIndexes":[
[
{
"path":"/Foo",
"order":"ascending"
},
{
"path":"/Bar",
"order":"ascending"
}
]
]
}
I would expect to the collection with something like:
query.OrderBy(e => new { e.Foo, e.Bar});
// or
query.OrderBy(e => e.Foo).ThenBy(e => e.Bar);
I would be happy with any other possible way of getting something achieved with the same effect of ordering composite indexes.
Will get back to you on this
Multi order in LINQ is not supported yet , work item is in queue but not prioritized yet. Will keep this thread open to track it
@simplynaveen20 is there any workaround to this issue until it's available as part of the SDK?
Looks like it's made it into the v3 SDK: https://github.com/Azure/azure-cosmos-dotnet-v3/pull/801
Most helpful comment
Multi order in LINQ is not supported yet , work item is in queue but not prioritized yet. Will keep this thread open to track it