Allow >, >=, <, <= comparison on array size

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Minor - P4
    • 1.9
    • Affects Version/s: 1.8.1
    • Component/s: None
    • None
    • Environment:
      C#, .NET 4.5, Linq
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Noticed when trying to build a query that only equals and not equals is supported. It is possible to implement this using JohnnyHK's answer from this post:

      http://stackoverflow.com/questions/7811163/in-mongo-db-how-do-i-find-documents-where-array-size-is-greater-than-1

      // Find all docs that have at least a second name array element.
      db.accommodations.find({'name.1': {$exists: true}})

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

              Created:
              Updated:
              Resolved: