apache / apache/lucene

Improve Weight.scorer() API to enforce consistent topScorer/outOfOrder parameters across segments [LUCENE-3532]

Open
#4,606 0 comments 0 reactions 0 assignees View on GitHub
affects-version:4.0-ALPHA legacy-jira-priority:Major module:core/search type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

Spinoff from #2610: In the past, when filters were applied, all scorers were forced to score in order. With random access DocIdSets, this is no longer needed. Some Weights (BooleanWeight) unfortunately return different scorers for in-order/out-of-order, leading to incompatible scores between segments.

For now we enforce in-order execution of scorers for FilteredQuery (as we do in 3.x), but once we fix BooleanWeight or have some other good way to produce compatible scores, we can reenable random access. Maybe we should nuke BooleanScorer2... - Robert and Mike have some ideas how to do that :)

---
Migrated from [LUCENE-3532](https://issues.apache.org/jira/browse/LUCENE-3532) by Uwe Schindler (@uschindler)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.