IndexDictionary (Lucene 10.5.0 codecs API)
Description: declaration: package: org.apache.lucene.codecs.uniformsplit, interface: IndexDictionary

Package org.apache.lucene.codecs.uniformsplit

# Interface IndexDictionary

All Known Implementing Classes:
  `FSTDictionary`

public interface IndexDictionary
Immutable stateless index dictionary kept in RAM.

Implementations must be immutable.

Use `IndexDictionary.Builder` to build the `IndexDictionary`.

Create a stateful `IndexDictionary.Browser` to seek a term in this `IndexDictionary` and get its corresponding block file pointer to the terms block file.

There is a single implementation of this interface, `FSTDictionary`. However this interface allows you to plug easily a new kind of index dictionary to experiment and improve the existing one.

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

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `IndexDictionary.Browser`
  Stateful `IndexDictionary.Browser` to seek a term in this `IndexDictionary` and get its corresponding block file pointer in the block file.
  `static interface`
  `IndexDictionary.BrowserSupplier`
  Supplier for a new stateful `IndexDictionary.Browser` created on the immutable `IndexDictionary`.
  `static interface`
  `IndexDictionary.Builder`
  Builds an immutable `IndexDictionary`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `IndexDictionary.Browser`
  `browser()`
  Creates a new `IndexDictionary.Browser`.
  `void`
  `write(DataOutput output, BlockEncoder blockEncoder)`
  Writes this dictionary to the provided output.

- ## Method Details

  - ### write

    void write(DataOutput output, BlockEncoder blockEncoder) throws IOException
    Writes this dictionary to the provided output.
    Parameters:
      `blockEncoder` - The `BlockEncoder` for specific encoding of this index dictionary; or null if none.
    Throws:
      `IOException`

  - ### browser

    IndexDictionary.Browser browser() throws IOException
    Creates a new `IndexDictionary.Browser`.
    Throws:
      `IOException`