Skip to content

[2.6] MOD-7896: Add weight factor to BM25 scoring calculation (#5670)#5712

Merged
Itzikvaknin merged 2 commits into2.6from
manual-backport-5670-to-2.6
Mar 3, 2025
Merged

[2.6] MOD-7896: Add weight factor to BM25 scoring calculation (#5670)#5712
Itzikvaknin merged 2 commits into2.6from
manual-backport-5670-to-2.6

Conversation

@Itzikvaknin
Copy link
Collaborator

@Itzikvaknin Itzikvaknin commented Mar 2, 2025

Backport #5670 to 2.6

In the original PR to master, some tests used BM25STD, which isn't available in this version, so I modified them to use BM25.

@codecov
Copy link

codecov bot commented Mar 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.19%. Comparing base (87a4491) to head (c3867f3).
Report is 1 commits behind head on 2.6.

Additional details and impacted files
@@            Coverage Diff             @@
##              2.6    #5712      +/-   ##
==========================================
+ Coverage   85.17%   85.19%   +0.02%     
==========================================
  Files         185      185              
  Lines       31504    31504              
==========================================
+ Hits        26833    26841       +8     
+ Misses       4671     4663       -8     

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

Itzikvaknin and others added 2 commits March 2, 2025 13:23
* 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 Itzikvaknin force-pushed the manual-backport-5670-to-2.6 branch from 34a0068 to c3867f3 Compare March 2, 2025 11:38
@Itzikvaknin Itzikvaknin requested a review from raz-mon March 2, 2025 12:00
@Itzikvaknin Itzikvaknin added this pull request to the merge queue Mar 3, 2025
Merged via the queue into 2.6 with commit 53c6670 Mar 3, 2025
11 checks passed
@Itzikvaknin Itzikvaknin deleted the manual-backport-5670-to-2.6 branch March 3, 2025 08:23
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.

2 participants