Class FST<T>

java.lang.Object
org.apache.lucene.util.fst.FST<T>
All Implemented Interfaces:
Accountable

public final class FST<T> extends Object implements Accountable
Represents an finite state machine (FST), using a compact byte[] format.

The format is similar to what's used by Morfologik (https://github.com/morfologik/morfologik-stemming).

See the package documentation for some simple examples.

  • Field Details

    • metadata

      final FST.FSTMetadata<T> metadata
    • BASE_RAM_BYTES_USED

      private static final long BASE_RAM_BYTES_USED
    • BIT_FINAL_ARC

      static final int BIT_FINAL_ARC
      See Also:
    • BIT_LAST_ARC

      static final int BIT_LAST_ARC
      See Also:
    • BIT_TARGET_NEXT

      static final int BIT_TARGET_NEXT
      See Also:
    • BIT_STOP_NODE

      static final int BIT_STOP_NODE
      See Also:
    • BIT_ARC_HAS_OUTPUT

      public static final int BIT_ARC_HAS_OUTPUT
      This flag is set if the arc has an output.
      See Also:
    • BIT_ARC_HAS_FINAL_OUTPUT

      static final int BIT_ARC_HAS_FINAL_OUTPUT
      See Also:
    • ARCS_FOR_DIRECT_ADDRESSING

      static final byte ARCS_FOR_DIRECT_ADDRESSING
      Value of the arc flags to declare a node with fixed length dense arcs and bit table designed for direct addressing.
      See Also:
    • ARCS_FOR_CONTINUOUS

      static final byte ARCS_FOR_CONTINUOUS
      Value of the arc flags to declare a node with continuous arcs designed for pos the arc directly with labelToPos - firstLabel. like ARCS_FOR_BINARY_SEARCH we use flag combinations that will not occur at the same time.
      See Also:
    • FILE_FORMAT_NAME

      private static final String FILE_FORMAT_NAME
      See Also:
    • VERSION_START

      public static final int VERSION_START
      First supported version, this is the version that was used when releasing Lucene 7.0.
      See Also:
    • VERSION_LITTLE_ENDIAN

      private static final int VERSION_LITTLE_ENDIAN
      See Also:
    • VERSION_CONTINUOUS_ARCS

      public static final int VERSION_CONTINUOUS_ARCS
      Version that started storing continuous arcs.
      See Also:
    • VERSION_CURRENT

      public static final int VERSION_CURRENT
      Current version.
      See Also:
    • VERSION_90

      public static final int VERSION_90
      Version that was used when releasing Lucene 9.0.
      See Also:
    • FINAL_END_NODE

      static final long FINAL_END_NODE
      See Also:
    • NON_FINAL_END_NODE

      static final long NON_FINAL_END_NODE
      See Also:
    • END_LABEL

      public static final int END_LABEL
      If arc has this label then that arc is final/accepted
      See Also:
    • fstReader

      private final FSTReader fstReader
      The reader of the FST, used to read bytes from the underlying FST storage
    • outputs

      public final Outputs<T> outputs
    • DEFAULT_MAX_BLOCK_BITS

      private static final int DEFAULT_MAX_BLOCK_BITS
  • Constructor Details

  • Method Details