[2.10] [MOD-10037] add default scorer in configuration (#7065)#7084
Merged
[2.10] [MOD-10037] add default scorer in configuration (#7065)#7084
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)
Collaborator
Author
|
Adding backport label because it should be easier to backport from already 2.10 to earlier versions than from master |
d0920e9 to
551acc9
Compare
551acc9 to
e36f93e
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 2.10 #7084 +/- ##
==========================================
- Coverage 89.31% 89.25% -0.07%
==========================================
Files 207 207
Lines 36169 35304 -865
==========================================
- Hits 32303 31509 -794
+ Misses 3866 3795 -71
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:
|
JoanFM
commented
Oct 17, 2025
nafraf
reviewed
Oct 27, 2025
Co-authored-by: nafraf <[email protected]>
nafraf
reviewed
Oct 28, 2025
nafraf
approved these changes
Oct 28, 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
(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 configurable DEFAULT_SCORER (default TFIDF), validate and apply it when no scorer is specified, expose it in INFO, and add tests and init/mocks plumbing.
DEFAULT_SCORERconfig (setter/getter), gated byENABLE_UNSTABLE_FEATURES, validated against registered scorers.defaultScorerinRSConfigand inRSConfig_GetInfoString/FT.CONFIG GET.RSGlobalConfig.defaultScorertoDEFAULT_SCORER_NAMEat module load; validate configured scorer after extensions load.Extensions_InitDone()for safe validation timing.RSGlobalConfig.defaultScorerwhen noSCORERprovided in search/aggregate (aggregate_request.c, LLAPI).default_scorerinINFOruntime_configurations.defaultScorer; add RMCK shutdown frees.Written by Cursor Bugbot for commit 102fe93. This will update automatically on new commits. Configure here.