Apply filter before scoring in MaxScoreBulkScorer
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
### Description
Now `MaxScoreBulkScorer` applies filter `bitset` after essential scorers have computed scores. This may perform unnecessary scoring for documents that will later be rejected by the filter.
https://github.com/apache/lucene/blob/main/lucene/core/src/java/org/apache/lucene/search/MaxScoreBulkScorer.java#L309
A filter `bitset` is similar to `liveDocs`, once available, we can pass the filter `bitset` to scorers so they can discard filtered documents before computing scores.
Contributor guide
Research direction
Start in lucene/core/src/java/org/apache/lucene/search/MaxScoreBulkScorer.java around line 309, where the filter bitset is applied after essential scorers compute scores. Trace how liveDocs and scorer inputs are handled, then determine how the filter can be considered before scoring. Done means filtered documents are discarded before unnecessary score computation without changing search results.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100