Enum TermSuggestionBuilder.StringDistanceImpl

    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.lang.Enum

        java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DAMERAU_LEVENSHTEIN
      String distance algorithm based on Damerau-Levenshtein algorithm.
      INTERNAL
      This is the default and is based on damerau_levenshtein, but highly optimized for comparing string distance for terms inside the index.
      JARO_WINKLER
      String distance algorithm based on Jaro-Winkler algorithm.
      LEVENSHTEIN
      String distance algorithm based on Levenshtein edit distance algorithm.
      NGRAM
      String distance algorithm based on character n-grams.
    • Method Detail

      • values

        public static TermSuggestionBuilder.StringDistanceImpl[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static TermSuggestionBuilder.StringDistanceImpl valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • toLucene

        public abstract org.apache.lucene.search.spell.StringDistance toLucene()