Class NearestFuzzyQuery

java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.classification.utils.NearestFuzzyQuery

public class NearestFuzzyQuery extends org.apache.lucene.search.Query
Simplification of FuzzyLikeThisQuery, to be used in the context of KNN classification.
  • Constructor Summary

    Constructors
    Constructor
    Description
    NearestFuzzyQuery(org.apache.lucene.analysis.Analyzer analyzer)
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTerms(String queryString, String fieldName)
    Adds user input for "fuzzification"
    boolean
    equals(Object other)
     
    int
     
    org.apache.lucene.search.Query
    rewrite(org.apache.lucene.index.IndexReader reader)
     
     
    void
    visit(org.apache.lucene.search.QueryVisitor visitor)
     

    Methods inherited from class org.apache.lucene.search.Query

    classHash, createWeight, sameClassAs, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • NearestFuzzyQuery

      public NearestFuzzyQuery(org.apache.lucene.analysis.Analyzer analyzer)
      Default constructor
      Parameters:
      analyzer - the analyzer used to process the query text
  • Method Details

    • addTerms

      public void addTerms(String queryString, String fieldName)
      Adds user input for "fuzzification"
      Parameters:
      queryString - The string which will be parsed by the analyzer and for which fuzzy variants will be parsed
    • rewrite

      public org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
      Overrides:
      rewrite in class org.apache.lucene.search.Query
      Throws:
      IOException
    • toString

      public String toString(String field)
      Specified by:
      toString in class org.apache.lucene.search.Query
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class org.apache.lucene.search.Query
    • equals

      public boolean equals(Object other)
      Specified by:
      equals in class org.apache.lucene.search.Query
    • visit

      public void visit(org.apache.lucene.search.QueryVisitor visitor)
      Specified by:
      visit in class org.apache.lucene.search.Query