TotalHitCountCollectorManager

Collector manager based on TotalHitCountCollector that allows users to parallelize counting the number of hits, expected to be used mostly wrapped in MultiCollectorManager. For cases when this is the only collector manager used, IndexSearcher.count should be called instead of IndexSearcher.search as the former is faster whenever the count can be returned directly from the index statistics.

Constructors

Link copied to clipboard
constructor(leafSlices: Array<IndexSearcher.LeafSlice>)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

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

Link copied to clipboard
open override fun reduce(collectors: MutableCollection<TotalHitCountCollector>): Int

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.