Class NearestFuzzyQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.classification.utils.NearestFuzzyQuery
-
public class NearestFuzzyQuery extends Query
Simplification of FuzzyLikeThisQuery, to be used in the context of KNN classification.
-
-
Constructor Summary
Constructors Constructor Description NearestFuzzyQuery(Analyzer analyzer)Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTerms(String queryString, String fieldName)Adds user input for "fuzzification"booleanequals(Object other)inthashCode()Queryrewrite(IndexSearcher indexSearcher)StringtoString(String field)voidvisit(QueryVisitor visitor)-
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, sameClassAs, toString
-
-
-
-
Constructor Detail
-
NearestFuzzyQuery
public NearestFuzzyQuery(Analyzer analyzer)
Default constructor- Parameters:
analyzer- the analyzer used to process the query text
-
-
Method Detail
-
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 Query rewrite(IndexSearcher indexSearcher) throws IOException
- Overrides:
rewritein classQuery- Throws:
IOException
-
visit
public void visit(QueryVisitor visitor)
-
-