indexOnly in explain() is not reported correctly

XMLWordPrintableJSON

    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Expected indexOnly:false but it is reported as true.

      skipjack:test> db.foo.find()
      { "_id" : ObjectId("4fa2ad3315f3f440e6aee399"), "a" : 1, "b" : 2 }
      { "_id" : ObjectId("4fa2ad3715f3f440e6aee39a"), "a" : 2, "b" : 2, "c" : 2 }
      
      skipjack:test> db.foo.find({a: 1, b:2, c: {$exists: false}}, {_id: 0, a:1}).explain().indexOnly
      true
      
      skipjack:test> db.foo.find({a: 1, b:2, c: {$exists: false}}, {_id: 0, a:1, c:1}).explain().indexOnly
      false
      
      skipjack:test> db.foo.getIndexKeys()
      [ { "_id" : 1 }, { "a" : 1, "b" : 1 } ]
      
      

              Assignee:
              Unassigned
              Reporter:
              siddharth.singh@10gen.com
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: