nscannedObjects is always 0 in text search command

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.6.0
    • Affects Version/s: 2.5.0
    • Component/s: Text Search
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      db.collection.insert({words: "test"})
      db.collection.ensureIndex({ words: 'text'})
      db.collection.runCommand('text', {search: "test"})
      {
        "queryDebugString": "test||||||",
        "language": "english",
        "results": [
          {
            "score": 1.1,
            "obj": {
              "_id": ObjectId("51a50462a2414ab2f8ebcfae"),
              "words": "test"
            }
          }
        ],
        "stats": {
          "nscanned": 1,
          "nscannedObjects": 0,
          "n": 1,
          "nfound": 1,
          "timeMicros": 75
        },
        "ok": 1
      }
      

      nscannedObjects can't possibly be 0 as we don't have _id in the index

              Assignee:
              Unassigned
              Reporter:
              Tyler Brock (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: