Details
-
Bug
-
Resolution: Won't Do
-
Major - P3
-
None
-
MongoDB 3.2.9, Windows 7 64 bit.
*Location*: https://docs.mongodb.com/manual/reference/operator/query/text/
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0
*Screen Resolution*: 1680 x 1050
Description
Could someone confirm the following strange behavior with MongoDB 3.2.9:
I have used the sample with db.articles collection at this location:
https://docs.mongodb.com/manual/reference/operator/query/text/
If you don't want to find the exact sample on MongoDB site, you could simply do the following:
db.articles.createIndex(
{ subject: "text" } )
db.articles.insert(
)
db.articles.insert(
)
db.articles.insert(
)
db.articles.insert(
)
When I type:
db.articles.find( { $text:
} )
it correctly finds 3 records.
Now add a new document with:
db.articles.insert({_id: 9, subject: "something", author: "whatever", views: 100})
and try to find it with:
db.articles.find( { $text:
} )
- the document is found.
Now add a new document with:
db.articles.insert({_id: 10, subject: "more", author: "whatever", views: 100})
Now try to find that document with:
db.articles.find( { $text:
} )
Unfortunately, the document is not found. I'm afraid that this could be a sign for bigger problems in MongoDB text searching.
gogox@yahoo.com