public class FuzzyLikeThisQuery extends Query
| Constructor and Description |
|---|
FuzzyLikeThisQuery(int maxNumTerms,
Analyzer analyzer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTerms(java.lang.String queryString,
java.lang.String fieldName,
float minSimilarity,
int prefixLength)
Adds user input for "fuzzification"
|
boolean |
equals(java.lang.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) |
java.lang.String |
toString(java.lang.String field)
Prints a query to a string, with
field assumed to be the
default field and omitted. |
classHash, createWeight, sameClassAs, toStringpublic FuzzyLikeThisQuery(int maxNumTerms,
Analyzer analyzer)
maxNumTerms - The total number of terms clauses that will appear once rewritten as a BooleanQuerypublic int hashCode()
QueryQueryCache works properly.hashCode in class QueryQuery.equals(Object)public boolean equals(java.lang.Object other)
QueryQueryCache 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 QueryQuery.sameClassAs(Object),
Query.classHash()public void addTerms(java.lang.String queryString,
java.lang.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; must be 0, 1 or 2 (see FuzzyTermsEnum)prefixLength - Length of required common prefix on variant terms (see FuzzyTermsEnum)public Query rewrite(IndexReader reader) throws java.io.IOException
Querypublic java.lang.String toString(java.lang.String field)
Queryfield assumed to be the
default field and omitted.public boolean isIgnoreTF()
public void setIgnoreTF(boolean ignoreTF)
Copyright © 2000–2025 The Apache Software Foundation. All rights reserved.