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

Text search ignores some words

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 3.2.7
    • Text Search
    • 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"}})

    Description

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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: