[SERVER-12195] Text matcher uses incorrect language for negation match Created: 23/Dec/13  Updated: 11/Jul/16  Resolved: 13/Feb/14

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.5.4
Fix Version/s: 2.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: J Rassi Assignee: J Rassi
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 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
>



 Comments   
Comment by Githook User [ 13/Feb/14 ]

Author:

{u'username': u'jrassi', u'name': u'Jason Rassi', u'email': u'rassi@10gen.com'}

Message: SERVER-12195 Text matcher should parse doc in doc language

This fixes the issue that the text matcher was incorrectly parsing
the document in the search language.
Branch: master
https://github.com/mongodb/mongo/commit/d8f7afc96a90ca3f158eebfe4ef3672a27788626

Comment by Eliot Horowitz (Inactive) [ 23/Dec/13 ]

Documents are always parsed in doc language.

Generated at Thu Feb 08 03:27:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.