Class FuzzyTerm

  • All Implemented Interfaces:
    TokenAnnotationSet, java.io.Serializable, java.lang.Cloneable

    public final class FuzzyTerm
    extends PhraseTerm
    Phrase that fuzzy matches all terms are similar to a specified term.
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_SIMILARITY

        public static final int DEFAULT_SIMILARITY
        Default value for similarity
        See Also:
        Constant Field Values
      • DEFAULT_PREFIX_LENGTH

        public static final int DEFAULT_PREFIX_LENGTH
        Default value for prefix length
        See Also:
        Constant Field Values
    • Constructor Detail

      • FuzzyTerm

        public FuzzyTerm()
        Constructor.
      • FuzzyTerm

        public FuzzyTerm​(java.lang.String text)
        Constructor.
      • FuzzyTerm

        public FuzzyTerm​(java.lang.String text,
                         int similarity)
        Constructor.
      • FuzzyTerm

        public FuzzyTerm​(SearchTerm term)
        Constructor.
    • Method Detail

      • getText

        public java.lang.String getText()
      • setText

        public void setText​(java.lang.String value)
      • getSimilarity

        public int getSimilarity()
      • setSimilarity

        public void setSimilarity​(int value)
      • getPrefixLength

        public int getPrefixLength()
      • setPrefixLength

        public void setPrefixLength​(int value)
      • setParameter

        public void setParameter​(java.lang.String name,
                                 java.lang.Object value)
        Set parameter name to value.

        NOTE: name is case insensitive.

        Overrides:
        setParameter in class PhraseTerm
      • containsParameters

        public boolean containsParameters​(boolean compact)
        Does this phrase operand contain any parameters in a non-default state.

        If compact is true this will only return true if at least one parameter in the compact representation of this phrase exists.

        Overrides:
        containsParameters in class PhraseTerm
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class PhraseTerm
      • toString

        public void toString​(java.lang.StringBuilder buffer,
                             boolean compact)
        Appends the string representation of this query to buffer.
        Specified by:
        toString in class Phrase