compareBottom

abstract 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.

For a search that hits many results, this method will be the hotspot (invoked by far the most frequently).

Return

any N < 0 if the doc's value is sorted after the bottom entry (not competitive), any N > 0 if the doc's value is sorted before the bottom entry and 0 if they are equal.

Parameters

doc

that was hit