Remove divide-by-zero formula hacks across sim impls [LUCENE-8023]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Follow-up to #9068
With the scoring api no longer passing e.g. docFreq=0 in corner cases such as SpanOrQuery, we can revert formula hacks that we added to many similarities. It may not be very significant for ranking but it removes confusion and makes it possible to have good explain() etc.
---
Migrated from [LUCENE-8023](https://issues.apache.org/jira/browse/LUCENE-8023) by Robert Muir (@rmuir)
Contributor guide
Research direction
Start by reading follow-up issue #9068 and locating the similarity implementations containing the divide-by-zero formula workarounds. Compare the affected formulas with the updated scoring API assumptions, then remove the obsolete hacks across the implementations and verify that explanations and corner-case scoring remain correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100