Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-15482

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

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

      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@mongodb.com Tess Avitabile (Inactive)
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: