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, combine, createWeight, extractTerms, getBoost, getSimilarity, mergeBooleanQueries, setBoost, toString, weight
public FuzzyLikeThisQuery(int maxNumTerms, Analyzer analyzer)
maxNumTerms
- The total number of terms clauses that will appear once rewritten as a BooleanQueryanalyzer
- public 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 parsedfieldName
- minSimilarity
- The minimum similarity of the term variants (see FuzzyTermEnum)prefixLength
- Length of required common prefix on variant terms (see FuzzyTermEnum)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.
The representation used is one that is supposed to be readable
by QueryParser
. However,
there are the following limitations:
public boolean isIgnoreTF()
public void setIgnoreTF(boolean ignoreTF)