-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
https://docs.mongodb.com/manual/text-search/
As per the docs, when I hit the query:
db.sample.find({ $text: { $search: "cakes \"coffee shop\"" } })
It should return all documents containing "coffee shop" OR "cakes". So it should return both documents. But it isnt happening. Contradicting to the definition given on the docs, it return only one doc from the data set:
{ "_id" : ObjectId("5ad609baac1a8b644180936b"), "content" : "coffee shop..." }
Here is the full data set:
/* 1 */ { "_id" : ObjectId("5ad609a2ac1a8b644180936a"), "content" : "Coffee and cakes..." } /* 2 */ { "_id" : ObjectId("5ad609baac1a8b644180936b"), "content" : "coffee shop..." }
Text index was already created for the field "content". Results are contradicting the definition (under Exact Phrase) text search docs:
- duplicates
-
DOCS-10382 Clarify if MongoDB text search is correct in manual or not
- Closed
- is duplicated by
-
SERVER-34521 Text Search not working properly
- Closed