Uses of Class org.apache.lucene.search.FieldComparator (Lucene 10.5.0 core API)
Description: use: package: org.apache.lucene.search, class: FieldComparator

# Uses of Class
org.apache.lucene.search.FieldComparator

Packages that use FieldComparator
Package
Description
org.apache.lucene.search
Code to search indices.
org.apache.lucene.search.comparators
Comparators, used to compare hits so as to determine their sort order when collecting the top results with `TopFieldCollector`.

- ## Uses of FieldComparator in org.apache.lucene.search

  Subclasses of FieldComparator in org.apache.lucene.search
  Modifier and Type
  Class
  Description
  `static final class`
  `FieldComparator.RelevanceComparator`
  Sorts by descending relevance.
  `static class`
  `FieldComparator.TermValComparator`
  Sorts by field's natural Term sort order.
  `class`
  `SimpleFieldComparator<T>`
  Base `FieldComparator` implementation that is used for all contexts.
  Fields in org.apache.lucene.search declared as FieldComparator
  Modifier and Type
  Field
  Description
  `protected final FieldComparator<?>[]`
  FieldValueHitQueue.`comparators`
  Methods in org.apache.lucene.search that return FieldComparator
  Modifier and Type
  Method
  Description
  `FieldComparator<?>`
  BinarySortField.`getComparator(int numHits, Pruning pruning)`
  `FieldComparator<?>`
  SortedNumericSortField.`getComparator(int numHits, Pruning pruning)`
  `FieldComparator<?>`
  SortedSetSortField.`getComparator(int numHits, Pruning pruning)`
  `FieldComparator<?>`
  SortField.`getComparator(int numHits, Pruning pruning)`
  Returns the `FieldComparator` to use for sorting.
  `FieldComparator<?>[]`
  FieldValueHitQueue.`getComparators()`
  `abstract FieldComparator<?>`
  FieldComparatorSource.`newComparator(String fieldname, int numHits, Pruning pruning, boolean reversed)`
  Creates a comparator for the field in the given index.

- ## Uses of FieldComparator in org.apache.lucene.search.comparators

  Subclasses of FieldComparator in org.apache.lucene.search.comparators
  Modifier and Type
  Class
  Description
  `class`
  `DocComparator`
  Comparator that sorts by asc _doc
  `class`
  `DoubleComparator`
  Comparator based on `Double.compare(double, double)` for `numHits`.
  `class`
  `FloatComparator`
  Comparator based on `Float.compare(float, float)` for `numHits`.
  `class`
  `IntComparator`
  Comparator based on `Integer.compare(int, int)` for `numHits`.
  `class`
  `LongComparator`
  Comparator based on `Long.compare(long, long)` for `numHits`.
  `class`
  `NumericComparator<T extends Number>`
  Abstract numeric comparator for comparing numeric values.
  `class`
  `TermOrdValComparator`
  Sorts by field's natural Term sort order, using ordinals.