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 other)
Override and implement query instance equivalence properly in a subclass.
|
int |
hashCode()
Override and implement query hash code properly in a subclass.
|
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. |
classHash, createWeight, sameClassAs, toString
public FuzzyLikeThisQuery(int maxNumTerms, Analyzer analyzer)
maxNumTerms
- The total number of terms clauses that will appear once rewritten as a BooleanQuerypublic int hashCode()
Query
QueryCache
works properly.hashCode
in class Query
Query.equals(Object)
public boolean equals(Object other)
Query
QueryCache
works properly.
Typically a query will be equal to another only if it's an instance of
the same class and its document-filtering properties are identical that other
instance. Utility methods are provided for certain repetitive code.equals
in class Query
Query.sameClassAs(Object)
,
Query.classHash()
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 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)