LeafFieldComparator
Expert: comparator that gets instantiated on each leaf from a top-level FieldComparator instance.
A leaf comparator must define these functions:
.setBottom This method is called by FieldValueHitQueue to notify the FieldComparator of the current weakest ("bottom") slot. Note that this slot may not hold the weakest value according to your comparator, in cases where your comparator is not the primary one (ie, is only used to break ties from the comparators before it).
.compareBottom Compare a new hit (docID) against the "weakest" (bottom) entry in the queue.
.compareTop Compare a new hit (docID) against the top value previously set by a call to FieldComparator.setTopValue.
.copy Installs a new hit into the priority queue. The FieldValueHitQueue calls this method when a new hit is competitive.
See also
Inheritors
Functions
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.
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).
Returns a competitive iterator
Informs this leaf comparator that hits threshold is reached. This method is called from a collector when hits threshold is reached.