Class LengthTokenFilter


  • public final class LengthTokenFilter
    extends TokenFilter
    Removes words that are too long or too short. This token filter is implemented using Apache Lucene.
    • Constructor Detail

      • LengthTokenFilter

        public LengthTokenFilter​(String name)
        Constructor of LengthTokenFilter.
        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

      • getMinLength

        public Integer getMinLength()
        Get the minLength property: The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max.
        Returns:
        the minLength value.
      • setMinLength

        public LengthTokenFilter setMinLength​(Integer minLength)
        Set the minLength property: The minimum length in characters. Default is 0. Maximum is 300. Must be less than the value of max.
        Parameters:
        minLength - the minLength value to set.
        Returns:
        the LengthTokenFilter object itself.
      • getMaxLength

        public Integer getMaxLength()
        Get the maxLength property: The maximum length in characters. Default and maximum is 300.
        Returns:
        the maxLength value.
      • setMaxLength

        public LengthTokenFilter setMaxLength​(Integer maxLength)
        Set the maxLength property: The maximum length in characters. Default and maximum is 300.
        Parameters:
        maxLength - the maxLength value to set.
        Returns:
        the LengthTokenFilter object itself.