⚠️ Behavior changes
Every change in this release is a bug fix, but each one corrects a scoring or ranking bug. Scores and result ordering will shift for some queries. That is why this ships as a minor rather than a patch: the public API is unchanged and upgrading is a drop-in, but the results you get back can differ, and that should not arrive silently in a patch bump.
If you assert on exact score values or on a specific result order, expect those assertions to need updating. Re-baseline them against 7.5.0 rather than pinning to 7.4.x, since the 7.4.x behavior was wrong in the cases below.
- Field-length normalisation now counts words correctly. Tabs and newlines were not treated as word separators, so a multi-line or tab-delimited field was scored as though it were one long word, making it look far shorter than it is. Fields containing
\t,\n, or\rnow score differently (#830). - Key weights are now normalised in object and keyless-logical search. Weights that did not sum to
1were applied unnormalised, skewing the relative influence of each key. If yourkeysweights do not already sum to1, your relative ranking changes (#833). limitnow returns the correct top-N when scores tie. A tie at the cutoff boundary could evict a result that should have been kept, solimitcould return the wrong items, not merely the right items in a different order (#835).- Bitap respects
minMatchCharLengthin the exact-match shortcut. Matches shorter thanminMatchCharLengthwere still reported via the exact-match fast path, so thematchesarray could contain entries it was configured to exclude (#831).
Bug Fixes
- bitap: respect minMatchCharLength in exact-match shortcut (dbb98b6), closes #831
- fieldNorm: count tabs and newlines as word separators (6fe85b0), closes #830
- fieldNorm: count word-starts instead of space transitions (2946f97)
- scoring: normalise key weights in object and keyless-logical search (e164b61), closes #833
- search: keep the correct top-N under limit when scores tie (437f8f3), closes #835, thanks @spokodev for the report and the fix
Full Changelog: v7.4.2...v7.5.0