Class FSTDictionary

  • All Implemented Interfaces:
    IndexDictionary, Accountable

    public class FSTDictionary
    extends java.lang.Object
    implements IndexDictionary
    Immutable stateless FST-based index dictionary kept in memory.

    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.

    Its greatest advantage is to be very compact in memory thanks to both the compaction of the FST as a byte array, and the incremental encoding of the leaves block pointer values, which are long integers in increasing order, with PositiveIntOutputs.
    With a compact dictionary in memory we can increase the number of blocks. This allows us to reduce the average block size, which means faster scan inside a block.

    • Field Detail

      • BASE_RAM_USAGE

        private static final long BASE_RAM_USAGE
      • dictionary

        protected final FST<java.lang.Long> dictionary
    • Constructor Detail

      • FSTDictionary

        protected FSTDictionary​(FST<java.lang.Long> dictionary)