public class FuzzyLikeThisQuery extends Query
Constructor and Description |
---|
FuzzyLikeThisQuery(int maxNumTerms,
Analyzer analyzer) |
Modifier and Type | Method and Description |
---|---|
void |
addTerms(String queryString,
String fieldName,
float minSimilarity,
int prefixLength)
Adds user input for "fuzzification"
|
boolean |
equals(Object obj) |
int |
hashCode() |
boolean |
isIgnoreTF() |
Query |
rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
|
void |
setIgnoreTF(boolean ignoreTF) |
String |
toString(String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
clone, createWeight, extractTerms, getBoost, setBoost, toString
public FuzzyLikeThisQuery(int maxNumTerms, Analyzer analyzer)
maxNumTerms
- The total number of terms clauses that will appear once rewritten as a BooleanQuerypublic void addTerms(String queryString, String fieldName, float minSimilarity, int prefixLength)
queryString
- The string which will be parsed by the analyzer and for which fuzzy variants will be parsedminSimilarity
- The minimum similarity of the term variants (see FuzzyTermsEnum)prefixLength
- Length of required common prefix on variant terms (see FuzzyTermsEnum)public Query rewrite(IndexReader reader) throws IOException
Query
rewrite
in class Query
IOException
public String toString(String field)
Query
field
assumed to be the
default field and omitted.public boolean isIgnoreTF()
public void setIgnoreTF(boolean ignoreTF)
Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.