Index only query fills in missing values with null

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Querying
    • Query
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      > db.bar.drop()
      false
      > db.bar.insert({_id:1})
      > db.bar.insert({_id:2})
      > db.bar.find({x:null}, {_id:1, x:1})
      { "_id" : 1 }
      { "_id" : 2 }
      > db.bar.ensureIndex({x:1, _id:1})
      > db.bar.find({x:null}, {_id:1, x:1})
      { "x" : null, "_id" : 1 }
      { "x" : null, "_id" : 2 }
      

        1. server6293.js
          0.8 kB
        2. server6293.js
          0.8 kB
        3. server6293.js
          0.5 kB

              Assignee:
              Backlog - Query Team (Inactive)
              Reporter:
              Mathias Stearn
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: