TopFieldCollectorManager

class TopFieldCollectorManager(sort: Sort, numHits: Int, after: FieldDoc?, totalHitsThreshold: Int) : CollectorManager<TopFieldCollector, TopFieldDocs>

Create a TopFieldCollectorManager which uses a shared hit counter to maintain number of hits and a shared MaxScoreAccumulator to propagate the minimum score across segments if the primary sort is by relevancy.

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

Constructors

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

Creates a new TopFieldCollectorManager from the given arguments.

constructor(sort: Sort, numHits: Int, totalHitsThreshold: Int)

Creates a new TopFieldCollectorManager from the given arguments, with thread-safe internal states.

Properties

Link copied to clipboard

Functions

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

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

Link copied to clipboard
open override fun reduce(collectors: MutableCollection<TopFieldCollector>): TopFieldDocs

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.