MOD-7896: Add weight factor to BM25 scoring calculation#5670
Merged
Itzikvaknin merged 11 commits intomasterfrom Feb 26, 2025
Merged
MOD-7896: Add weight factor to BM25 scoring calculation#5670Itzikvaknin merged 11 commits intomasterfrom
Itzikvaknin merged 11 commits intomasterfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5670 +/- ##
==========================================
- Coverage 88.04% 88.02% -0.03%
==========================================
Files 197 197
Lines 35577 35576 -1
==========================================
- Hits 31322 31314 -8
- Misses 4255 4262 +7 ☔ View full report in Codecov by Sentry. |
Expand testTFIDFScorerExplanation in test_scorers
to test_scorers
Collaborator
|
@Itzikvaknin Update the PR comment please. |
raz-mon
reviewed
Feb 20, 2025
Collaborator
raz-mon
left a comment
There was a problem hiding this comment.
Nice
See a few comments
Fix BM25STD calculation
raz-mon
reviewed
Feb 22, 2025
raz-mon
reviewed
Feb 23, 2025
raz-mon
previously approved these changes
Feb 23, 2025
oshadmi
reviewed
Feb 26, 2025
oshadmi
reviewed
Feb 26, 2025
…TDScorerExplanation
oshadmi
approved these changes
Feb 26, 2025
2 tasks
Collaborator
Author
|
/backport |
Contributor
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.10
git worktree add -d .worktree/backport-5670-to-2.10 origin/2.10
cd .worktree/backport-5670-to-2.10
git switch --create backport-5670-to-2.10
git cherry-pick -x 65a4c9e396228d024d7ca4d34a9e99bccbcced31 |
Contributor
|
Successfully created backport PR for |
redisearch-backport-pull-request bot
pushed a commit
that referenced
this pull request
Feb 27, 2025
* Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation (cherry picked from commit 65a4c9e)
Itzikvaknin
added a commit
that referenced
this pull request
Feb 27, 2025
* Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
Itzikvaknin
added a commit
that referenced
this pull request
Feb 27, 2025
* Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 27, 2025
MOD-7896: Add weight factor to BM25 scoring calculation (#5670) * Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation (cherry picked from commit 65a4c9e) Co-authored-by: Itzikvaknin <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Feb 27, 2025
MOD-7896: Add weight factor to BM25 scoring calculation (#5670) * Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
Collaborator
Author
|
/backport |
Itzikvaknin
added a commit
that referenced
this pull request
Mar 2, 2025
* Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
Itzikvaknin
added a commit
that referenced
this pull request
Mar 2, 2025
* Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
Itzikvaknin
added a commit
that referenced
this pull request
Mar 2, 2025
* Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 3, 2025
…#5712) * MOD-7896: Add weight factor to BM25 scoring calculation (#5670) * Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation * Add test with scoring
github-merge-queue bot
pushed a commit
that referenced
this pull request
Mar 3, 2025
…#5709) * MOD-7896: Add weight factor to BM25 scoring calculation (#5670) * Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation * Add Env import
LukeMathWalker
pushed a commit
to LukeMathWalker/RediSearch
that referenced
this pull request
Mar 3, 2025
) * Update BM25 scoring calculations to incorporate weight factor in explanations * Add weight to explainscore Expand testTFIDFScorerExplanation in test_scorers * Add testBM25STDScoreWithWeight and testBM25ScoreWithWeight to test_scorers * Fix testOptionalAndWildcardScoring * Fix testBM25STDScorerExplanation * Add docs to scorer_with_weight_test Fix BM25STD calculation * Remove unnecessary isCluster condition from test_scorers * Add hash seed to force docs distribution * Name change * Fix test_scorers:testBM25ScorerExplanation and test_scorers:testBM25STDScorerExplanation
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.
This PR fixes an issue where the weight attribute was not applied when querying a single term using the BM25 scorer, as demonstrated in the example below:
DB:
Behavior before the fix:
Behavior after the fix:
EXPLAIN was updated accordingly: