apache / apache/lucene

Should MAXSCOREBulkScorer sometimes apply filters after essential clauses.

Open
#15,519 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Currently, MAXSCOREBulkScorer always applies filters in parallel with essential clauses (by intersecting the filter with a heap containing essential clauses in a leap frog fashion).

When the sum of costs of essential clauses is less than the cost of the filter, it would likely be more efficient to "post filter" hits of essential clauses, ie. pull hits of essential clauses into a `DocAndScoreBuffer` and then remove hits from this buffer that don't match the filter.

Contributor guide

Open the contributing guide

Research direction

Start in MAXSCOREBulkScorer and trace how essential clauses and filters are intersected, including the DocAndScoreBuffer path. Compare the costs of essential clauses with the filter and determine how the post-filtering branch should preserve matching and scoring behavior. Done means the cheaper execution strategy is selected under the stated condition and focused coverage verifies both paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.