org.apache.lucene.codecs.uniformsplit

## Interface IndexDictionary.Browser

- All Known Implementing Classes:
    FSTDictionary.Browser
  Enclosing interface:
    IndexDictionary

      public 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.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getBlockFilePointer()` Returns the block file pointer associated with the key returned.
    `int` | `getBlockPrefixLen()` Returns the number of characters of this block's key that is in common with all terms in this block.
    `BytesRef` | `nextKey()` Returns the next block key and positions the browser at this key.
    `BytesRef` | `peekKey()` Returns the next key without advancing.
    `long` | `seekBlock(BytesRef term)` Seeks the given term in the `IndexDictionary` and returns its corresponding block file pointer.

- - ### Method Detail

    - #### seekBlock

          long seekBlock(BytesRef term)

      Seeks the given term in the `IndexDictionary` and returns its corresponding block file pointer.
      Returns:
        The block file pointer corresponding to the term if it matches exactly a block key in the dictionary. Otherwise the floor block key, which is the greatest block key present in the dictionary that is alphabetically preceding the searched term. Otherwise `-1` if there is no floor block key because the searched term precedes alphabetically the first block key of the dictionary.

    - #### nextKey

          BytesRef nextKey()

      Returns the next block key and positions the browser at this key. A key is a prefix of a term in the dictionary. If seekBlock was just called then this is the current block key.

    - #### peekKey

          BytesRef peekKey()

      Returns the next key without advancing. Only call this after `nextKey()` returns a non-null result.

    - #### getBlockPrefixLen

          int getBlockPrefixLen()

      Returns the number of characters of this block's key that is in common with all terms in this block. Only call this after `nextKey()` returns a non-null result.

    - #### getBlockFilePointer

          long getBlockFilePointer()

      Returns the block file pointer associated with the key returned. Only call this after `nextKey()` returns a non-null result.

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