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

nscannedObjects is always 0 in text search command

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 2.6.0
    • 2.5.0
    • Text Search
    • None
    • ALL

    Description

      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

      Attachments

        Activity

          People

            Unassigned Unassigned
            tyler@10gen.com Tyler Brock
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: