Details
-
Improvement
-
Resolution: Done
-
Major - P3
-
None
-
None
-
windows 7 profesional, Linux 14.10, mongodb 2.6.3
*Location*: http://docs.mongodb.org/manual/reference/operator/query/text/
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36
*Referrer*: http://docs.mongodb.org/manual/reference/operator/query/regex/
*Screen Resolution*: 1600 x 900
*repo*: docs
*source*: reference/operator/query/text
windows 7 profesional, Linux 14.10, mongodb 2.6.3 *Location*: http://docs.mongodb.org/manual/reference/operator/query/text/ *User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36 *Referrer*: http://docs.mongodb.org/manual/reference/operator/query/regex/ *Screen Resolution*: 1600 x 900 *repo*: docs *source*: reference/operator/query/text
Description
I found a Bug on search query in mongodb:
if you add a repeat character in the end of the stringg, the query not find the document.
For example:
db.foo.insert(
{desc: "This is a string with text"});
db.foo.insert(
);
db.foo.ensureIndex(
);
db.foo.find({
$text:
});
The Result is:
{
"_id" : ObjectId("53dfd9453e1e4201402d2f5d"),
"desc" : "This is a string with text"
}
And that query, should be:
{
"_id" : ObjectId("53dfd9453e1e4201402d2f5d"),
"desc" : "This is a string with text"
}
{
"_id" : ObjectId("53dfd9453e1e4201402d2f5e"),
"desc" : "This is a string with textt"
}