Skip to content

Change in behavior using SimpleCollector+TopScoreDocCollector between 10.2 and 10.3 when scoreMode==COMPLETE #15239

@hossman

Description

@hossman

Description

Attempting to upgrade Solr to use Lucene 10.3 caused a regression in one of our tests, which i tracked down a to a change in behavior when using a SimpleCollector (subclass) that wraps a TopScoreDocCollector instance

It's not clear to me if this new 10.3 behavior is technically "wrong", or if Solr is (miss|ab)using some of the Collector APIs -- so i wanted to file this report for completeness (Even if Solr ultimately makes other changes to work around this change in behavior)


I've boiled the problem down to the simplest test case patch i can think of that demonstrates the problem. In 10.2, both asserts in this test pass, in 10.3, neither assert will pass.

The crux of the issue as i understand it, is that TopScoreDocCollector tracks competitive scoring info that it cares about in the Scorable, and that info is (now) being used by the Scorer to limit what documents are collected -- even though the Collector says it wants ScoreMode.COMPLETE collection.

collector_behavior_change_10_3.patch.txt

(FWIW: the patch modifies TestMultiCollector simply because i didn't see a more obvious place to add tests of subclassing SimpleCollector)

Version and environment details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions