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

Text search ignores some words

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.7
    • Component/s: Text Search
    • Labels:
      None
    • ALL
    • Hide
      > db.s.insert({"name": "is"})
      WriteResult({ "nInserted" : 1 })
      > db.s.insert({"name": "dog"})
      WriteResult({ "nInserted" : 1 })
      > db.s.createIndex({"name": "text"})
      {
              "createdCollectionAutomatically" : false,
              "numIndexesBefore" : 1,
              "numIndexesAfter" : 2,
              "ok" : 1
      }
      > db.s.find({$text: {$search: "is"}}) *why there are no results?*
      > db.s.find({$text: {$search: "dog"}})
      { "_id" : ObjectId("578287a4a2bdbd1636963ee3"), "name" : "dog" }
      > db.s.insert({"name": "this"})
      WriteResult({ "nInserted" : 1 })
      > db.s.insert({"name": "cat"})
      WriteResult({ "nInserted" : 1 })
      > db.s.find({$text: {$search: "cat"}})
      { "_id" : ObjectId("578287dba2bdbd1636963ee5"), "name" : "cat" }
      > db.s.find({$text: {$search: "this"}})
      
      Show
      > db.s.insert({"name": "is"}) WriteResult({ "nInserted" : 1 }) > db.s.insert({"name": "dog"}) WriteResult({ "nInserted" : 1 }) > db.s.createIndex({"name": "text"}) { "createdCollectionAutomatically" : false, "numIndexesBefore" : 1, "numIndexesAfter" : 2, "ok" : 1 } > db.s.find({$text: {$search: "is"}}) *why there are no results?* > db.s.find({$text: {$search: "dog"}}) { "_id" : ObjectId("578287a4a2bdbd1636963ee3"), "name" : "dog" } > db.s.insert({"name": "this"}) WriteResult({ "nInserted" : 1 }) > db.s.insert({"name": "cat"}) WriteResult({ "nInserted" : 1 }) > db.s.find({$text: {$search: "cat"}}) { "_id" : ObjectId("578287dba2bdbd1636963ee5"), "name" : "cat" } > db.s.find({$text: {$search: "this"}})

      Words like 'this', 'is' are ignored in text search. See Steps to Reproduce for more details

            Assignee:
            Unassigned Unassigned
            Reporter:
            Capricornus Konstantin Khabarlak [X]
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: