public class MatchQuery
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
MatchQuery.Type |
static class |
MatchQuery.ZeroTermsQuery |
Modifier and Type | Field and Description |
---|---|
protected org.apache.lucene.analysis.Analyzer |
analyzer |
protected java.lang.Float |
commonTermsCutoff |
protected QueryShardContext |
context |
static boolean |
DEFAULT_LENIENCY
the default leniency setting
|
static int |
DEFAULT_PHRASE_SLOP
the default phrase slop
|
static MatchQuery.ZeroTermsQuery |
DEFAULT_ZERO_TERMS_QUERY
the default zero terms query
|
protected boolean |
enablePositionIncrements |
protected Fuzziness |
fuzziness |
protected int |
fuzzyPrefixLength |
protected org.apache.lucene.search.MultiTermQuery.RewriteMethod |
fuzzyRewriteMethod |
protected boolean |
lenient |
protected int |
maxExpansions |
protected org.apache.lucene.search.BooleanClause.Occur |
occur |
protected int |
phraseSlop |
protected boolean |
transpositions |
protected MatchQuery.ZeroTermsQuery |
zeroTermsQuery |
Constructor and Description |
---|
MatchQuery(QueryShardContext context) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.lucene.search.Query |
blendTermQuery(org.apache.lucene.index.Term term,
MappedFieldType fieldType) |
protected org.apache.lucene.search.Query |
blendTermsQuery(org.apache.lucene.index.Term[] terms,
MappedFieldType fieldType) |
protected org.apache.lucene.analysis.Analyzer |
getAnalyzer(MappedFieldType fieldType,
boolean quoted) |
org.apache.lucene.search.Query |
parse(MatchQuery.Type type,
java.lang.String fieldName,
java.lang.Object value) |
void |
setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer) |
void |
setAnalyzer(java.lang.String analyzerName) |
void |
setCommonTermsCutoff(java.lang.Float cutoff) |
void |
setEnablePositionIncrements(boolean enablePositionIncrements) |
void |
setFuzziness(Fuzziness fuzziness) |
void |
setFuzzyPrefixLength(int fuzzyPrefixLength) |
void |
setFuzzyRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod fuzzyRewriteMethod) |
void |
setLenient(boolean lenient) |
void |
setMaxExpansions(int maxExpansions) |
void |
setOccur(org.apache.lucene.search.BooleanClause.Occur occur) |
void |
setPhraseSlop(int phraseSlop) |
void |
setTranspositions(boolean transpositions) |
void |
setZeroTermsQuery(MatchQuery.ZeroTermsQuery zeroTermsQuery) |
protected org.apache.lucene.search.Query |
termQuery(MappedFieldType fieldType,
org.apache.lucene.util.BytesRef value,
boolean lenient) |
protected org.apache.lucene.search.Query |
zeroTermsQuery() |
public static final int DEFAULT_PHRASE_SLOP
public static final boolean DEFAULT_LENIENCY
public static final MatchQuery.ZeroTermsQuery DEFAULT_ZERO_TERMS_QUERY
protected final QueryShardContext context
protected org.apache.lucene.analysis.Analyzer analyzer
protected org.apache.lucene.search.BooleanClause.Occur occur
protected boolean enablePositionIncrements
protected int phraseSlop
protected Fuzziness fuzziness
protected int fuzzyPrefixLength
protected int maxExpansions
protected boolean transpositions
protected org.apache.lucene.search.MultiTermQuery.RewriteMethod fuzzyRewriteMethod
protected boolean lenient
protected MatchQuery.ZeroTermsQuery zeroTermsQuery
protected java.lang.Float commonTermsCutoff
public MatchQuery(QueryShardContext context)
public void setAnalyzer(java.lang.String analyzerName)
public void setAnalyzer(org.apache.lucene.analysis.Analyzer analyzer)
public void setOccur(org.apache.lucene.search.BooleanClause.Occur occur)
public void setCommonTermsCutoff(java.lang.Float cutoff)
public void setEnablePositionIncrements(boolean enablePositionIncrements)
public void setPhraseSlop(int phraseSlop)
public void setFuzziness(Fuzziness fuzziness)
public void setFuzzyPrefixLength(int fuzzyPrefixLength)
public void setMaxExpansions(int maxExpansions)
public void setTranspositions(boolean transpositions)
public void setFuzzyRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod fuzzyRewriteMethod)
public void setLenient(boolean lenient)
public void setZeroTermsQuery(MatchQuery.ZeroTermsQuery zeroTermsQuery)
protected org.apache.lucene.analysis.Analyzer getAnalyzer(MappedFieldType fieldType, boolean quoted)
public org.apache.lucene.search.Query parse(MatchQuery.Type type, java.lang.String fieldName, java.lang.Object value) throws java.io.IOException
java.io.IOException
protected final org.apache.lucene.search.Query termQuery(MappedFieldType fieldType, org.apache.lucene.util.BytesRef value, boolean lenient)
protected org.apache.lucene.search.Query zeroTermsQuery()
protected org.apache.lucene.search.Query blendTermsQuery(org.apache.lucene.index.Term[] terms, MappedFieldType fieldType)
protected org.apache.lucene.search.Query blendTermQuery(org.apache.lucene.index.Term term, MappedFieldType fieldType)