How can we improve Azure Cosmos DB?

Support LINQ ANY or WHERE for child object collections

Example trying to query Sales

var querySales = DocumentDb.Client.CreateDocumentQuery<Sale>(collectionLink)
.Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Any(qq => qq.Id == userId))

Buy ANY not supported

Also tried
.Where(q => q.Type == "Sale" && q.Stage <= 99 && q.InvolvedParties.Where(qq => qq.Id == advisorUserId).Count() > 0)

get WHERE not supported

Really want the DB to perform the search as a lot of results will come back.

sample data:
{
"id": "af10eebf-b0b6-49d5-8db5-96f54c4985d2",
"Type": "Sale",
"GroupId": 1,
"InvolvedParties": [
{
"Id": "344595a3-4e73-4bd5-9988-849858f045f1",
"PartyType": 0,
"Name": "test user"
}
],

157 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Chris shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

6 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base