Skip to content

Order two-phase iterators in DenseConjunctionBulkScorer by matchCost#16370

Merged
romseygeek merged 3 commits into
apache:mainfrom
romseygeek:bulk/order-two-phase
Jul 7, 2026
Merged

Order two-phase iterators in DenseConjunctionBulkScorer by matchCost#16370
romseygeek merged 3 commits into
apache:mainfrom
romseygeek:bulk/order-two-phase

Conversation

@romseygeek

Copy link
Copy Markdown
Contributor

Currently two-phase iterators are ordered by their approximation cost. Many two-phase implementations use maxDoc as their approximation, however, meaning that we don't necessarily get a good ordering between them and more expensive matches can be called unnecessarily.

This adds an additional comparison layer for two-phase iterators that orders by matchCost.

Currently two-phase iterators are ordered by their approximation
cost. Many two-phase implementations use maxDoc as their approximation,
however, meaning that we don't necessarily get a good ordering
between them and more expensive matches can be called unnecessarily.

This adds an additional comparison layer for two-phase iterators
that orders by matchCost.
@romseygeek romseygeek requested a review from jimczi July 7, 2026 11:13
@romseygeek romseygeek self-assigned this Jul 7, 2026

@iverase iverase left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it

@romseygeek romseygeek merged commit c4e4e9b into apache:main Jul 7, 2026
12 checks passed
@romseygeek romseygeek deleted the bulk/order-two-phase branch July 7, 2026 12:39
romseygeek added a commit that referenced this pull request Jul 7, 2026
…16370)

Currently two-phase iterators are ordered by their approximation
cost. Many two-phase implementations use maxDoc as their approximation,
however, meaning that we don't necessarily get a good ordering
between them and more expensive matches can be called unnecessarily.

This adds an additional comparison layer for two-phase iterators
that orders by matchCost.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants