LongLeafComparator

Leaf comparator for LongComparator that provides skipping functionality

Constructors

Link copied to clipboard
constructor(context: LeafReaderContext)

Functions

Link copied to clipboard
open override fun compareBottom(doc: Int): Int

Compare the bottom of the queue with this doc. This will only invoked after setBottom has been called. This should return the same result as FieldComparator.compare} as if bottom were slot1 and the new document were slot 2.

Link copied to clipboard
open override fun compareTop(doc: Int): Int

Compare the top value with this doc. This will only invoked after setTopValue has been called. This should return the same result as FieldComparator.compare} as if topValue were slot1 and the new document were slot 2. This is only called for searches that use searchAfter (deep paging).

Link copied to clipboard

Returns a competitive iterator

Link copied to clipboard
open override fun copy(slot: Int, doc: Int)

This method is called when a new hit is competitive. You should copy any state associated with this document that will be required for future comparisons, into the specified slot.

Link copied to clipboard
open override fun setBottom(slot: Int)

Set the bottom slot, ie the "weakest" (sorted last) entry in the queue. When .compareBottom is called, you should compare against this slot. This will always be called before .compareBottom.

Link copied to clipboard
open override fun setHitsThresholdReached()

Informs this leaf comparator that hits threshold is reached. This method is called from a collector when hits threshold is reached.

Link copied to clipboard
open override fun setScorer(scorer: Scorable)

Sets the Scorer to use in case a document's score is needed.