Sorts by field's natural Term sort order. All comparisons are done using BytesRef.compareTo, which is slow for medium to large result sets but possibly very fast for very small results sets.
<init>(int numHits, String field, boolean sortMissingLast)Sole constructor.
setBottom(int bottom) · also: set_bottomcompare(int slot1, int slot2)compareBottom(int doc)compareTop(int doc)copy(int slot, int doc)getLeafComparator(org.apache.lucene.index.LeafReaderContext context)setScorer(org.apache.lucene.search.Scorable scorer) · also: set_scorersetTopValue(org.apache.lucene.util.BytesRef value) · also: set_top_valueReturns a competitive iterator
Returns: an iterator over competitive docs that are stronger than already collected docs or
null if such an iterator is not available for the current comparator or segment.
setHitsThresholdReached()Informs this leaf comparator that hits threshold is reached. This method is called from a collector when hits threshold is reached.
disableSkipping()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.
setSingleSort()Informs the comparator that sort is done on this single field. This is useful to enable some optimizations for skipping non-competitive documents.