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

indexOnly in explain() is not reported correctly

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL

      Description

      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 } ]
       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: