MultiCollector

A Collector which allows running a search with several Collectors. It offers a static wrap method which accepts a list of collectors and wraps them with MultiCollector, while filtering out the null ones.

NOTE:When mixing collectors that want to skip low-scoring hits ([ ScoreMode.TOP_SCORES]) with ones that require to see all hits, such as mixing [ TopScoreDocCollector] and [TotalHitCountCollector], it should be faster to run the query twice, once for each collector, rather than using this wrapper on a single search.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override var weight: Weight?

Set the Weight that will be used to produce scorers that will feed [ ]s. This is typically useful to have access to Weight.count from .

Functions

Link copied to clipboard

Provides access to the wrapped Collectors for advanced use-cases

Link copied to clipboard
open override fun getLeafCollector(context: LeafReaderContext): LeafCollector

Create a new collector to collect the given context.

Link copied to clipboard
open override fun scoreMode(): ScoreMode

Indicates what features are required from the scorer.