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 and Description
    --- | ---
    `static String` | `NAME` The name this Provider is registered under

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

      `name`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SortField` | `readSortField(DataInput in)` Reads a SortField from serialized bytes
    `void` | `writeSortField(SortField sf, DataOutput out)` Writes a SortField to a DataOutput This is used to record index sort information in segment headers

    - ### 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 Detail

    - #### NAME

          public static final String NAME

      The name this Provider is registered under
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Provider

          public Provider()

      Creates a new Provider

  - ### Method Detail

    - #### 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`

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