compareTop

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

Return

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

Parameters

doc

that was hit