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"
}
],

146 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Chris shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →
    started  ·  AdminAzure Cosmos DB Team (Admin, Microsoft Azure) responded  · 

    We have started work on this feature and plan to release it in an upcoming release. I cannot give an exact date but this should be released soon. Will update here once a date is known or once it is publicly available.

    Thank you for your suggestion.

    5 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base