[2.8] [MOD-10037] add default scorer in configuration (#7065)#7086
Merged
[2.8] [MOD-10037] add default scorer in configuration (#7065)#7086
Conversation
* feat: add default scorer in configuration * fix and test config setters and getters * test: add flow tests checking scorer behavior * fix: fix as per cursor comments * fix: fix as per code review * fix: change the init config code * test: fix the tests * test: refactor tests * fix memory leak in getter * test: add explicit test BM25STD is the default since start * validate default scorer at module init * fix validation against extensions * apply changes as per review * Update tests/cpptests/test_cpp_forkgc.cpp * refactor small setter * try to fix sanitizer leak * test: Known leaks when onModuleLoad fails * Update src/module-init/module-init.c Co-authored-by: kei-nan <[email protected]> --------- Co-authored-by: kei-nan <[email protected]> (cherry picked from commit b61c075)
264db4f to
240c4fa
Compare
4ad907f to
b3bbf9f
Compare
JoanFM
commented
Oct 17, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.8 #7086 +/- ##
==========================================
- Coverage 87.49% 87.44% -0.06%
==========================================
Files 203 203
Lines 35636 34791 -845
==========================================
- Hits 31181 30422 -759
+ Misses 4455 4369 -86
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ch into backport-7065-to-2.8
…ch into backport-7065-to-2.8
nafraf
reviewed
Oct 27, 2025
Co-authored-by: nafraf <[email protected]>
nafraf
previously approved these changes
Oct 28, 2025
meiravgri
approved these changes
Oct 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: add default scorer in configuration
fix and test config setters and getters
test: add flow tests checking scorer behavior
fix: fix as per cursor comments
fix: fix as per code review
fix: change the init config code
test: fix the tests
test: refactor tests
fix memory leak in getter
test: add explicit test BM25STD is the default since start
validate default scorer at module init
fix validation against extensions
apply changes as per review
Update tests/cpptests/test_cpp_forkgc.cpp
refactor small setter
try to fix sanitizer leak
test: Known leaks when onModuleLoad fails
Update src/module-init/module-init.c
Backport of #7065 to
2.8.(cherry picked from commit b61c075)
Describe the changes in the pull request
A clear and concise description of what the PR is solving, including:
Which additional issues this PR fixes
Main objects this PR modified
Mark if applicable
Note
Introduce DEFAULT_SCORER config (gated by ENABLE_UNSTABLE_FEATURES), validate against registered scorers, use it as the default across search/aggregate, and add tests and info/LLAPI updates.
DEFAULT_SCORERconfig (requiresENABLE_UNSTABLE_FEATURES) with setters/getters and validation viaExtensions_GetScoringFunction.RSConfig(defaultScorer) and include inFT.CONFIG GET *and INFO output.ENABLE_UNSTABLE_FEATURESruntime flag.RSGlobalConfig.defaultScorertoDEFAULT_SCORER_NAMEon load; validate selected scorer at startup.Extensions_InitDone()helper.RSGlobalConfig.defaultScorerwhen noSCORERspecified inFT.SEARCH/FT.AGGREGATEand LLAPI.aggregate_request.c,query_optimizer.c,redisearch_api.c).default_scorerin INFO and config dump strings.defaultScorerduring bootstrap/shutdown.Written by Cursor Bugbot for commit edb80f6. This will update automatically on new commits. Configure here.