Skip to content

[8.0] MOD-7896: Add weight factor to BM25 scoring calculation#5702

Merged
redisearch-backport-pull-request[bot] merged 1 commit into8.0from
backport-5670-to-8.0
Feb 27, 2025
Merged

[8.0] MOD-7896: Add weight factor to BM25 scoring calculation#5702
redisearch-backport-pull-request[bot] merged 1 commit into8.0from
backport-5670-to-8.0

Conversation

@redisearch-backport-pull-request
Copy link
Contributor

Description

Backport of #5670 to 8.0.

* 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)
@codecov
Copy link

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.00%. Comparing base (5123aca) to head (97ec189).
Report is 2 commits behind head on 8.0.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.0    #5702      +/-   ##
==========================================
+ Coverage   87.97%   88.00%   +0.02%     
==========================================
  Files         197      197              
  Lines       35545    35544       -1     
==========================================
+ Hits        31272    31279       +7     
+ Misses       4273     4265       -8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@redisearch-backport-pull-request redisearch-backport-pull-request bot added this pull request to the merge queue Feb 27, 2025
Merged via the queue into 8.0 with commit b36fa9f Feb 27, 2025
9 checks passed
@redisearch-backport-pull-request redisearch-backport-pull-request bot deleted the backport-5670-to-8.0 branch February 27, 2025 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant