[SERVER-45363] Issue with mongodb text indexes and weights when using wildcard specifier Created: 04/Jan/20 Updated: 29/Oct/23 Resolved: 27/Jan/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Text Search |
| Affects Version/s: | None |
| Fix Version/s: | 4.2.4, 4.3.3, 3.6.18, 4.0.17 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | David Lynch | Assignee: | Ted Tuckman |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | qopt-team | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Major Change | |||||||||||||||||||||||||||||||||||||||||||||||
| Operating System: | ALL | |||||||||||||||||||||||||||||||||||||||||||||||
| Backport Requested: |
v4.2, v4.0, v3.6
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Steps To Reproduce: | Consider the following:
When searching the animals collection I would expect textScores for "name" matches to be 500 times higher than other fields that are matched by the wildcard ("$**": "text"). Checking the index confirms this:
Note that the wildcard above does have the expected weight ("$**" : 1) However the following example shows this to not be the case:
returns:
Here i was expecting a score of 1.1, since the only field to match was matched via wildcard. Really confused on how the 500 weight would be applied to the "guardian" field match? I've tested this code with 3.6.16 and 4.0 and get the same results
Also posted here: https://stackoverflow.com/questions/59556771/issue-with-mongodb-text-indexes-and-weights-when-using-wildcard-specifier
|
|||||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Query 2020-01-27, Query 2020-02-10 | |||||||||||||||||||||||||||||||||||||||||||||||
| Participants: | ||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Issue Status as of March 6 2020 ISSUE SUMMARY USER IMPACT RECOVERY STEPS AFFECTED VERSIONS FIX VERSION |
| Comments |
| Comment by Githook User [ 06/Mar/20 ] |
|
Author: {'name': 'Ted Tuckman', 'username': 'TedTuckman', 'email': 'ted.tuckman@mongodb.com'}Message: (cherry picked from commit 4bb2ad4c48c07d267c98f5443e0984a5e1ef7209) |
| Comment by Githook User [ 05/Mar/20 ] |
|
Author: {'name': 'Ted Tuckman', 'username': 'TedTuckman', 'email': 'ted.tuckman@mongodb.com'}Message: (cherry picked from commit 4bb2ad4c48c07d267c98f5443e0984a5e1ef7209) |
| Comment by Githook User [ 05/Mar/20 ] |
|
Author: {'name': 'Ted Tuckman', 'username': 'TedTuckman', 'email': 'ted.tuckman@mongodb.com'}Message: (cherry picked from commit 4bb2ad4c48c07d267c98f5443e0984a5e1ef7209) |
| Comment by Githook User [ 27/Jan/20 ] |
|
Author: {'username': 'TedTuckman', 'name': 'Ted Tuckman', 'email': 'ted.tuckman@mongodb.com'}Message: |
| Comment by Danny Hatcher (Inactive) [ 06/Jan/20 ] |
|
Thanks for your report; I'll forward to the appropriate team. |