DoubleComparator
Comparator based on Double.compare for numHits. This comparator provides a skipping functionality - an iterator that can skip over non-competitive documents.
Constructors
Types
Leaf comparator for DoubleComparator that provides skipping functionality
Functions
Returns a negative integer if first is less than second, 0 if they are equal and a positive integer otherwise. Default impl to assume the type implements Comparable and invoke .compareTo; be sure to override this method if your FieldComparator's type isn't a Comparable or if your values may sometimes be null
Informs the comparator that the skipping of documents should be disabled. This function is called by TopFieldCollector in cases when the skipping functionality should not be applied or not necessary. An example could be when search sort is a part of the index sort, and can be already efficiently handled by TopFieldCollector, and doing extra work for skipping in the comparator is redundant.
Get a per-segment LeafFieldComparator to collect the given [ ]. All docIDs supplied to this [ ] are relative to the current reader (you must add docBase if you need to map it to a top-level docID).
Informs the comparator that sort is done on this single field. This is useful to enable some optimizations for skipping non-competitive documents.
Record the top value, for future calls to LeafFieldComparator.compareTop. This is only called for searches that use searchAfter (deep paging), and is called before any calls to .getLeafComparator.