FieldComparatorSource (Lucene 3.6.2 API)
Keywords: org.apache.lucene.search.FieldComparatorSource class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.lucene.search
Class FieldComparatorSource

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

All Implemented Interfaces:
  Serializable

Direct Known Subclasses:
  DistanceFieldComparatorSource

    public abstract class FieldComparatorSource

extends Object
implements Serializable

Provides a `FieldComparator` for custom field sorting.

See Also:
  Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
`FieldComparatorSource()`

Method Summary
`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)
                                              throws IOException

  Creates a comparator for the field in the given index.

  Parameters:
    `fieldname` - Name of the field to create comparator for.
  Returns:
    FieldComparator.
  Throws:
    `IOException` - If an error occurs reading the index.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD