-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query 2020-01-27, Query 2020-02-10
ISSUE SUMMARY
When inserting a document into a collection with a text index, the weight value for each field in that document is reflected in scores stored inside the index key. If the index is a wildcard text index and also has one or more weighted fields, the index will assign an incorrect weight to any field that is lexicographically smaller (alphabetically earlier) than a field with a specified weight. Instead of assigning the default weight, the field will be assigned the weight of the next specified field in the index.
USER IMPACT
Documents in collections with text indexes that have both a wildcard match and a weighted field may have incorrect text scores in the index, and therefore get incorrect scores back projecting or sorting on {$meta: "textScore" }.
RECOVERY STEPS
Dropping and recreating affected text indexes on a version of mongod that includes the patch will fix this issue. This should be done for every wildcard text index with custom weights on specific fields.
AFFECTED VERSIONS
This affects all versions prior to <version-with-fix>.
FIX VERSION
The fix will be included in <version-with-fix>.
- is depended on by
-
SERVER-45363 Issue with mongodb text indexes and weights when using wildcard specifier
- Closed