Documentation of 'org.apache.lucene.search.FuzzyTermEnum' Java class
FuzzyTermEnum
org.apache.lucene.search

Class FuzzyTermEnum



  • public final class FuzzyTermEnum
    extends FilteredTermEnum
    Subclass of FilteredTermEnum for enumerating all terms that are similiar to the specified filter term.

    Term enumerations are always ordered by Term.compareTo(). Each term in the enumeration is greater than all that precede it.

    • Constructor Summary

      Constructors 
      Constructor and Description
      FuzzyTermEnum(IndexReader reader, Term term)
      Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.
      FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity)
      Creates a FuzzyTermEnum with an empty prefix.
      FuzzyTermEnum(IndexReader reader, Term term, float minSimilarity, int prefixLength)
      Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Closes the enumeration to further activity, freeing resources.
      float difference()
      Equality measure on the term
      boolean endEnum()
      Indicates the end of the enumeration has been reached
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FuzzyTermEnum

        public FuzzyTermEnum(IndexReader reader,
                             Term term)
                      throws java.io.IOException
        Creates a FuzzyTermEnum with an empty prefix and a minSimilarity of 0.5f.

        After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

        Parameters:
        reader -
        term -
        Throws:
        java.io.IOException
        See Also:
        FuzzyTermEnum(IndexReader, Term, float, int)
      • FuzzyTermEnum

        public FuzzyTermEnum(IndexReader reader,
                             Term term,
                             float minSimilarity)
                      throws java.io.IOException
        Creates a FuzzyTermEnum with an empty prefix.

        After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

        Parameters:
        reader -
        term -
        minSimilarity -
        Throws:
        java.io.IOException
        See Also:
        FuzzyTermEnum(IndexReader, Term, float, int)
      • FuzzyTermEnum

        public FuzzyTermEnum(IndexReader reader,
                             Term term,
                             float minSimilarity,
                             int prefixLength)
                      throws java.io.IOException
        Constructor for enumeration of all terms from specified reader which share a prefix of length prefixLength with term and which have a fuzzy similarity > minSimilarity.

        After calling the constructor the enumeration is already pointing to the first valid term if such a term exists.

        Parameters:
        reader - Delivers terms.
        term - Pattern term.
        minSimilarity - Minimum required similarity for terms from the reader. Default value is 0.5f.
        prefixLength - Length of required common prefix. Default value is 0.
        Throws:
        java.io.IOException
    • Method Detail

      • endEnum

        public final boolean endEnum()
        Description copied from class: FilteredTermEnum
        Indicates the end of the enumeration has been reached
      • close

        public void close()
                   throws java.io.IOException
        Description copied from class: FilteredTermEnum
        Closes the enumeration to further activity, freeing resources.
        Overrides:
        close in class FilteredTermEnum
        Throws:
        java.io.IOException

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.