[DOCS-10382] Clarify if MongoDB text search is correct in manual or not Created: 11/Jun/17 Updated: 30/Oct/23 Resolved: 22/Jan/19 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | manual, Server |
| Affects Version/s: | None |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | 아나 하리 | Assignee: | Stennie Steneker (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: | |||
| Issue Links: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Days since reply: | 5 years, 3 weeks, 2 days ago | ||||||||||||||||||||
| Epic Link: | DOCSP-1769 | ||||||||||||||||||||
| Story Points: | 0.2 | ||||||||||||||||||||
| Description |
|
According to the manual (https://docs.mongodb.com/manual/text-search/),
I am not sure whether manual is correct or not. Anyway manual and MongoDB result are not matched. |
| Comments |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}Message: |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'username': 'stennie', 'email': 'stennie@cpan.org', 'name': 'Stephen Steneker'}Message: |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}Message: |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}Message: |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'username': 'stennie', 'email': 'stennie@cpan.org', 'name': 'Stephen Steneker'}Message: |
| Comment by Mark Agarunov [ 12/Jun/17 ] |
|
david.storch, According to other parts of the documentation, which Thomas linked, as well as previous tickets requesting a way to perform an exact phrase search with OR instead of AND (https://jira.mongodb.org/browse/SERVER-22583), I concluded that the behavior is intentional, therefore documentation is incorrect. Additionally, my assumption would be that the phrase must be present in the document to be returned when searching for an exact phrase. |
| Comment by David Storch [ 12/Jun/17 ] |
|
mark.agarunov, how did you conclude that this behavior is a documentation bug and not a server bug? When I saw this report I was concerned that the original reporter had found a server bug. I'll try to spend a few minutes digging into the code later in order to try and decide whether this was intentional or not. EDIT: Oh, I think I see now. This phrase search query means "coffee shop" AND ("java" OR "coffee" OR "shop"). Given this meaning, it appears that the text search engine is functioning as designed. I was surprised to learn that this query does not mean "coffee shop" AND "java". |
| Comment by Kelsey Schubert [ 12/Jun/17 ] |
|
For reference, underlying logic is correctly documented here: https://docs.mongodb.com/manual/reference/operator/query/text/#phrases |
| Comment by Mark Agarunov [ 12/Jun/17 ] |
|
Hello matt.lee, Thank you for the report. I've been able to reproduce the behavior you've described and agree that it does not match the behavior as documented: Exact Phrase You can also search for exact phrases by wrapping them in double-quotes. For example, the following will find all documents containing “java” or “coffee shop”: I've moved this ticket to the DOCS project so that the documentation can be updated to reflect the actual behavior. Thanks, |