org.apache.lucene.search

## Class FieldComparatorSource

- java.lang.Object
- - org.apache.lucene.search.FieldComparatorSource

-     public abstract class FieldComparatorSource
      extends Object

  Provides a `FieldComparator` for custom field sorting.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldComparatorSource()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract FieldComparator<?>` | `newComparator(String fieldname, int numHits, int sortPos, boolean reversed)` Creates a comparator for the field in the given index.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FieldComparatorSource

          public FieldComparatorSource()

  - ### Method Detail

    - #### newComparator

          public abstract FieldComparator<?> newComparator(String fieldname,
                                                           int numHits,
                                                           int sortPos,
                                                           boolean reversed)

      Creates a comparator for the field in the given index.
      Parameters:
        `fieldname` - Name of the field to create comparator for.
      Returns:
        FieldComparator.

Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.