# Package org.apache.lucene.search.comparators

Comparators, used to compare hits so as to determine their sort order when collecting the top results with `TopFieldCollector`.

- Class Summary
  Class | Description
  --- | ---
  DocComparator | Comparator that sorts by asc _doc
  DoubleComparator | Comparator based on `Double.compare(double, double)` for `numHits`.
  FloatComparator | Comparator based on `Float.compare(float, float)` for `numHits`.
  IntComparator | Comparator based on `Integer.compare(int, int)` for `numHits`.
  LongComparator | Comparator based on `Long.compare(long, long)` for `numHits`.
  MinDocIterator | Docs iterator that starts iterating from a configurable minimum document
  NumericComparator<T extends Number> | Abstract numeric comparator for comparing numeric values.
  TermOrdValComparator | Sorts by field's natural Term sort order, using ordinals.