public class FuzzyLikeThisQuery
extends org.apache.lucene.search.Query
Constructor and Description |
---|
FuzzyLikeThisQuery(int maxNumTerms,
org.apache.lucene.analysis.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() |
org.apache.lucene.search.Query |
rewrite(org.apache.lucene.index.IndexReader reader) |
void |
setIgnoreTF(boolean ignoreTF) |
String |
toString(String field) |
public FuzzyLikeThisQuery(int maxNumTerms, org.apache.lucene.analysis.Analyzer analyzer)
maxNumTerms
- The total number of terms clauses that will appear once rewritten as a BooleanQueryanalyzer
- public int hashCode()
hashCode
in class org.apache.lucene.search.Query
public boolean equals(Object obj)
equals
in class org.apache.lucene.search.Query
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 org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader) throws IOException
rewrite
in class org.apache.lucene.search.Query
IOException
public String toString(String field)
toString
in class org.apache.lucene.search.Query
public boolean isIgnoreTF()
public void setIgnoreTF(boolean ignoreTF)