TopScoreDocCollectorManager

class TopScoreDocCollectorManager(numHits: Int, after: ScoreDoc?, totalHitsThreshold: Int) : CollectorManager<TopScoreDocCollector, TopDocs>

Create a TopScoreDocCollectorManager which uses a shared hit counter to maintain number of hits and a shared MaxScoreAccumulator to propagate the minimum score across segments

Note that a new collectorManager should be created for each search due to its internal states.

Constructors

Link copied to clipboard
constructor(numHits: Int, after: ScoreDoc?, totalHitsThreshold: Int)
constructor(numHits: Int, after: ScoreDoc?, totalHitsThreshold: Int, supportsConcurrency: Boolean)

Creates a new TopScoreDocCollectorManager given the number of hits to collect and the number of hits to count accurately.

constructor(numHits: Int, totalHitsThreshold: Int)

Creates a new TopScoreDocCollectorManager given the number of hits to collect and the number of hits to count accurately, with thread-safe internal states.

Functions

Link copied to clipboard
open override fun newCollector(): TopScoreDocCollector

Return a new Collector. This must return a different instance on each call.

Link copied to clipboard
open override fun reduce(collectors: MutableCollection<TopScoreDocCollector>): TopDocs

Reduce the results of individual collectors into a meaningful result. For instance a [ ] would compute the top docs of each collector and then merge them using TopDocs.merge. This method must be called after collection is finished on all provided collectors.