$size with non-whole-number parameter shouldn't require full scan

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 3.3.2
    • Affects Version/s: None
    • Component/s: Querying
    • Minor Change
    • Query 10 (02/22/16)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Consider:

      db.collection.find({a: {$size: n}})
      

      If "n" is 1.5 or -2, no documents can match. Yet explain() shows a full scan. The query should be short-circuited and return no documents immediately.

            Assignee:
            Tess Avitabile (Inactive)
            Reporter:
            A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: