[SERVER-11994] Text search matcher can incorrectly match documents w/ non-lowercased negated term Created: 06/Dec/13  Updated: 11/Jul/16  Resolved: 09/Dec/13

Status: Closed
Project: Core Server
Component/s: Text Search
Affects Version/s: 2.5.4
Fix Version/s: 2.5.5

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

Issue Links:
Related
Operating System: ALL
Participants:

 Description   

If a text query contains a negated term with a non-trivial stemming, the text search matcher will incorrectly match documents that contain the term if it is not completely lowercased.

Reproduce with:

> db.foo.remove()
Remove WriteResult({ "ok" : 1, "n" : 1 })
> db.foo.insert({a:"PIZZA RESTAURANT"})
Insert WriteResult({ "ok" : 1, "n" : 1 })
> db.foo.runCommand("text",{search:"pizza -restaurant"}).stats.n
1



 Comments   
Comment by Githook User [ 09/Dec/13 ]

Author:

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

Message: SERVER-11994 Fix logic error in processing of text search negated terms
Branch: master
https://github.com/mongodb/mongo/commit/ea1bcc2beb6638034c1c811042d399f1b92e5cd2

Comment by J Rassi [ 06/Dec/13 ]

Original report: https://groups.google.com/forum/#!topic/mongodb-user/GBal3rsgueM

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