Class TruncateTokenFilter


  • public final class TruncateTokenFilter
    extends TokenFilter
    Truncates the terms to a specific length. This token filter is implemented using Apache Lucene.
    • Constructor Detail

      • TruncateTokenFilter

        public TruncateTokenFilter​(String name)
        Constructor of TruncateTokenFilter.
        Parameters:
        name - The name of the token filter. It must only contain letters, digits, spaces, dashes or underscores, can only start and end with alphanumeric characters, and is limited to 128 characters.
    • Method Detail

      • getLength

        public Integer getLength()
        Get the length property: The length at which terms will be truncated. Default and maximum is 300.
        Returns:
        the length value.
      • setLength

        public TruncateTokenFilter setLength​(Integer length)
        Set the length property: The length at which terms will be truncated. Default and maximum is 300.
        Parameters:
        length - the length value to set.
        Returns:
        the TruncateTokenFilter object itself.