Package org.apache.lucene.search

# Class SortField.Provider

java.lang.Object
org.apache.lucene.index.SortFieldProvider
org.apache.lucene.search.SortField.Provider

All Implemented Interfaces:
  `NamedSPILoader.NamedSPI`

Enclosing class:
  `SortField`

public static final class SortField.Provider extends SortFieldProvider
A SortFieldProvider for field sorts

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`NAME`
The name this Provider is registered under

### Fields inherited from class org.apache.lucene.index.SortFieldProvider

`name`

## Constructor Summary

Constructors
Constructor
Description
`Provider()`
Creates a new Provider

## Method Summary

Modifier and Type
Method
Description
`SortField`
`readSortField(DataInput in)`
Reads a SortField from serialized bytes
`void`
`writeSortField(SortField sf, DataOutput out)`
Writes a SortField to a DataOutput

### Methods inherited from class org.apache.lucene.index.SortFieldProvider

`availableSortFieldProviders, forName, getName, reloadSortFieldProviders, write`

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

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

## Field Details

### NAME

public static final String NAME
The name this Provider is registered under

See Also:
  - Constant Field Values

## Constructor Details

### Provider

public Provider()
Creates a new Provider

## Method Details

### readSortField

public SortField readSortField(DataInput in) throws IOException
Description copied from class: `SortFieldProvider`
Reads a SortField from serialized bytes

Specified by:
  `readSortField` in class `SortFieldProvider`
Throws:
  `IOException`

### writeSortField

public void writeSortField(SortField sf, DataOutput out) throws IOException
Description copied from class: `SortFieldProvider`
Writes a SortField to a DataOutput

This is used to record index sort information in segment headers

Specified by:
  `writeSortField` in class `SortFieldProvider`
Throws:
  `IOException`