Details
-
Bug
-
Status: Closed
-
Major - P3
-
Resolution: Fixed
-
2.5.1
-
None
-
ALL
Description
db.test.drop()
|
db.test.insert({words: "tyler dogs"}) |
db.test.ensureIndex({"words": "text"}) |
|
// expect no results, phrase match works
|
> db.test.runCommand('text', {search: "\"tyler cats\""}) |
{
|
"queryDebugString" : "cat|tyler||||tyler cats||", |
"results" : [ ] |
}
|
|
// expect no results, phrase match ignores cats!
|
> db.test.runCommand('text', {search: "\"tyler -cats\""}) |
{
|
"queryDebugString" : "tyler||||||tyler -cats", |
"results" : [ |
{
|
"score" : 0.75, |
"obj" : { |
"_id" : ObjectId("51f2c3adf9477b8250ef438a"), |
"words" : "tyler dogs" |
}
|
}
|
]
|
}
|
Would highly recommend backport to 2.4.x. when this gets resolved.