-
Type:
Bug
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 2.5.4
-
Component/s: Text Search
-
None
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
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
>