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

nscannedObjects is always 0 in text search command

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

      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 Unassigned
            Reporter:
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: