SimpleCollector

Base Collector implementation that is used to collect all contexts.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override var scorer: Scorable?

Called before successive calls to .collect. Implementations that need the score of the current document (passed-in to .collect), should save the passed-in Scorer and call scorer.score() when needed.

Link copied to clipboard
abstract 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
open fun collect(stream: DocIdStream)

Bulk-collect doc IDs.

abstract override fun collect(doc: Int)

Called once for every document matching a query, with the unbased document number.

Link copied to clipboard

Optionally returns an iterator over competitive documents.

Link copied to clipboard
open fun finish()

Hook that gets called once the leaf that is associated with this collector has finished collecting successfully, including when a CollectionTerminatedException is thrown. This is typically useful to compile data that has been collected on this leaf, e.g. to convert facet counts on leaf ordinals to facet counts on global ordinals. The default implementation does nothing.

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

Create a new collector to collect the given context.

Link copied to clipboard
abstract fun scoreMode(): ScoreMode

Indicates what features are required from the scorer.