Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
3.1.0
-
Query
-
ALL
-
Description
Case sensitive text searches fail to match terms that contain embedded NUL characters.
The behavior is inconsistent across $caseSensitive: true and $caseSensitive: false, even if the documents and queries use the same casing:
> t.insert({_id: 0, a: 'keyboard\0mouse'});
|
WriteResult({ "nInserted" : 1 })
|
|
|
> t.find()
|
{ "_id" : 0, "a" : "keyboard\u0000mouse" }
|
|
|
// the document is returned with a case insensitive search
|
> t.find({$text: {$search: 'keyboard\0mouse', $caseSensitive: false}});
|
{ "_id" : 0, "a" : "keyboard\u0000mouse" }
|
|
|
// no document is returned with a case sensitive search
|
> t.find({$text: {$search: 'keyboard\0mouse', $caseSensitive: true}});
|
> // no results
|
Attachments
Issue Links
- is related to
-
SERVER-17437 Case-sensitive mode for text search
-
- Closed
-