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

Text matcher uses incorrect language for negation match

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 2.6.0-rc0
    • 2.5.4
    • Text Search
    • None
    • ALL

    Description

      The text negation matcher parses the document using the search language. It should instead be parsing the document with the document language.

      > db.foo.insert({_id:0, a:"gladly 007"})
      > db.foo.ensureIndex({a:"text"})
      > db.foo.find({$text:{$search:"glad", $language:"spanish"}})
      { "_id" : 0, "a" : "gladly 007" }
      > db.foo.find({$text:{$search:"007 -glad", $language:"spanish"}})
      { "_id" : 0, "a" : "gladly 007" } // incorrect, not caught by negation because "gladly" stemmed with Spanish stemmer
      >

      Attachments

        Activity

          People

            rassi J Rassi
            rassi J Rassi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: