[SERVER-30163] Additional terms in phrase search are implicitly ignored. Created: 15/Jul/17 Updated: 27/Dec/23 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Text Search |
| Affects Version/s: | 3.4.6 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Dun Peal | Assignee: | Backlog - Query Integration |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | mql-semantics, qi-text-search, query-44-grooming | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Assigned Teams: |
Query Integration
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Steps To Reproduce: |
Then run the following text search:
Only the one document containing the phrase "coffee shop" is returned. Documents containing the word "java" are not returned, and in fact having the term "java" in the search has no effect whatsoever on the results returned. |
||||||||||||
| Participants: | |||||||||||||
| Description |
|
As currently specified, the logic for phrase matching implicitly ignores any additional terms in the $search string. For example, the $search string: "\"ssl certificate\" authority key" Shall be compiled to the following search: "ssl certificate" and ("authority" or "key" or "ssl" or "certificate" ) As you can see in the compiled search, all terms besides the phrase "ssl certificate" will be ignored. The search will match all strings that contain the phrase, and none other. In particular, strings that contain any of these additional terms - "authority", "key", or both - will not match unless they also contain the phrase. There are two problems with this behavior:
Therefore, I propose that the $search strings with a phrase will perform a logical "OR" between the phrase and any of the other phrases or terms in the string. So, for example, the string above will compile to: "ssl certificate" OR "authority" OR "key" This behavior is consistent with the behavior of regular text searches (that do not contain phrases), and provides additional functionality when the user adds additional terms, instead of implicitly ignoring them as is done currently. Finally, this behavior conforms to parts of the manual that are currently wrong; see for example |
| Comments |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}Message: Clarify current behaviour as per SERVER-30163 (Additional terms in phrase search are implicitly ignored) |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'username': 'stennie', 'email': 'stennie@cpan.org', 'name': 'Stephen Steneker'}Message: Clarify current behaviour as per SERVER-30163 (Additional terms in phrase search are implicitly ignored) |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}Message: Clarify current behaviour as per SERVER-30163 (Additional terms in phrase search are implicitly ignored) |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'email': 'stennie@cpan.org', 'name': 'Stephen Steneker', 'username': 'stennie'}Message: Clarify current behaviour as per SERVER-30163 (Additional terms in phrase search are implicitly ignored) |
| Comment by Githook User [ 22/Jan/19 ] |
|
Author: {'username': 'stennie', 'email': 'stennie@cpan.org', 'name': 'Stephen Steneker'}Message: Clarify current behaviour as per SERVER-30163 (Additional terms in phrase search are implicitly ignored) |
| Comment by Ian Whalen (Inactive) [ 21/Jul/17 ] |
|
Hi Dun, we definitely recognize that the current semantics are less than ideal, but we're not focusing on Text Search improvements for the current release. We will definitely revisit this as we start planning for future releases. |
| Comment by David Storch [ 17/Jul/17 ] |
|
Hi dunpeal, Thanks for raising this issue. We've had some discussion internally around this, sparked by Best, |