Rewrite $elemMatch with $or referencing implied element due to server limitations

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: 3.5.2
    • Component/s: LINQ
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      The server can't handle this query:

      { A : { $elemMatch : { $or : [{ $eq : 2 }, { $gt : 3 }] } } } 

      but it can be rewritten as:

      { $or : [{ A : { $elemMatch : { $eq : 2 } } }, { A : { $elemMatch : { $gt : 3 } } }] } 

      which the server can handle.

            Assignee:
            Robert Stam
            Reporter:
            Robert Stam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: