-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
Affects Version/s: 2.4.0-rc3
-
Component/s: Text Search
-
None
-
Query Integration
A text search for an english word with language set to russian returns english results, searches with the same keyword but language set to spanish return no results
> db.foo.insert({text:"hello world", language:"english"}) > db.foo.ensureIndex({text:"text"}) > db.foo.runCommand("text",{search:"hello",language:"english"}) { "queryDebugString" : "hello||||||", "language" : "english", "results" : [ { "score" : 0.75, "obj" : { "_id" : ObjectId("51435cd6141e7117a6ca8092"), "text" : "hello world", "language" : "english" } } ], "stats" : { "nscanned" : 1, "nscannedObjects" : 0, "n" : 1, "nfound" : 1, "timeMicros" : 344 }, "ok" : 1 } > db.foo.runCommand("text",{search:"hello",language:"spanish"}) { "queryDebugString" : "hell||||||", "language" : "spanish", "results" : [ ], "stats" : { "nscanned" : 0, "nscannedObjects" : 0, "n" : 0, "nfound" : 0, "timeMicros" : 2383 }, "ok" : 1 } > db.foo.runCommand("text",{search:"hello",language:"russian"}) { "queryDebugString" : "hello||||||", "language" : "russian", "results" : [ { "score" : 0.75, "obj" : { "_id" : ObjectId("51435cd6141e7117a6ca8092"), "text" : "hello world", "language" : "english" } } ], "stats" : { "nscanned" : 1, "nscannedObjects" : 0, "n" : 1, "nfound" : 1, "timeMicros" : 243 }, "ok" : 1 } >
- is duplicated by
-
SERVER-13998 Support for language constrained search
- Backlog