|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CommonQueryParserConfiguration
Configuration options common across queryparser implementations.
Method Summary | |
---|---|
boolean |
getAllowLeadingWildcard()
|
Analyzer |
getAnalyzer()
|
boolean |
getEnablePositionIncrements()
|
float |
getFuzzyMinSim()
Get the minimal similarity for fuzzy queries. |
int |
getFuzzyPrefixLength()
Get the prefix length for fuzzy queries. |
Locale |
getLocale()
Returns current locale, allowing access by subclasses. |
boolean |
getLowercaseExpandedTerms()
|
MultiTermQuery.RewriteMethod |
getMultiTermRewriteMethod()
|
int |
getPhraseSlop()
Gets the default slop for phrases. |
TimeZone |
getTimeZone()
|
void |
setAllowLeadingWildcard(boolean allowLeadingWildcard)
Set to true to allow leading wildcard characters. |
void |
setDateResolution(DateTools.Resolution dateResolution)
Sets the default DateTools.Resolution used for certain field when
no DateTools.Resolution is defined for this field. |
void |
setEnablePositionIncrements(boolean enabled)
Set to true to enable position increments in result query. |
void |
setFuzzyMinSim(float fuzzyMinSim)
Set the minimum similarity for fuzzy queries. |
void |
setFuzzyPrefixLength(int fuzzyPrefixLength)
Set the prefix length for fuzzy queries. |
void |
setLocale(Locale locale)
Set locale used by date range parsing. |
void |
setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Whether terms of multi-term queries (e.g., wildcard, prefix, fuzzy and range) should be automatically lower-cased or not. |
void |
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
By default, it uses MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT when creating a
prefix, wildcard and range queries. |
void |
setPhraseSlop(int defaultPhraseSlop)
Sets the default slop for phrases. |
void |
setTimeZone(TimeZone timeZone)
|
Method Detail |
---|
void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
true
.
boolean getLowercaseExpandedTerms()
setLowercaseExpandedTerms(boolean)
void setAllowLeadingWildcard(boolean allowLeadingWildcard)
true
to allow leading wildcard characters.
When set, *
or ?
are allowed as the first
character of a PrefixQuery and WildcardQuery. Note that this can produce
very slow queries on big indexes.
Default: false.
void setEnablePositionIncrements(boolean enabled)
true
to enable position increments in result query.
When set, result phrase and multi-phrase queries will be aware of position increments. Useful when e.g. a StopFilter increases the position increment of the token that follows an omitted token.
Default: false.
boolean getEnablePositionIncrements()
setEnablePositionIncrements(boolean)
void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT
when creating a
prefix, wildcard and range queries. This implementation is generally
preferable because it a) Runs faster b) Does not have the scarcity of terms
unduly influence score c) avoids any TooManyListenersException
exception. However, if your application really needs to use the
old-fashioned boolean queries expansion rewriting and the above points are
not relevant then use this change the rewrite method.
MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
setMultiTermRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod)
void setFuzzyPrefixLength(int fuzzyPrefixLength)
fuzzyPrefixLength
- The fuzzyPrefixLength to set.void setLocale(Locale locale)
Locale getLocale()
void setTimeZone(TimeZone timeZone)
TimeZone getTimeZone()
void setPhraseSlop(int defaultPhraseSlop)
Analyzer getAnalyzer()
boolean getAllowLeadingWildcard()
setAllowLeadingWildcard(boolean)
float getFuzzyMinSim()
int getFuzzyPrefixLength()
int getPhraseSlop()
void setFuzzyMinSim(float fuzzyMinSim)
FuzzyQuery.defaultMinSimilarity
.
void setDateResolution(DateTools.Resolution dateResolution)
DateTools.Resolution
used for certain field when
no DateTools.Resolution
is defined for this field.
dateResolution
- the default DateTools.Resolution
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |