@Deprecated public class QueryParserWrapper extends Object
QueryParser
API. QueryParser
API are needed at the same time. Modifier and Type | Class and Description |
---|---|
static class |
QueryParserWrapper.Operator
Deprecated.
The default operator for parsing queries.
|
Modifier and Type | Field and Description |
---|---|
static QueryParserWrapper.Operator |
AND_OPERATOR
Deprecated.
Alternative form of QueryParser.Operator.AND
|
static QueryParserWrapper.Operator |
OR_OPERATOR
Deprecated.
Alternative form of QueryParser.Operator.OR
|
Constructor and Description |
---|
QueryParserWrapper(String defaultField,
Analyzer analyzer)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
static String |
escape(String s)
Deprecated.
Returns a String where those characters that QueryParser expects to be
escaped are escaped by a preceding
\ . |
ParseException |
generateParseException()
Deprecated.
|
boolean |
getAllowLeadingWildcard()
Deprecated.
|
Analyzer |
getAnalyzer()
Deprecated.
|
protected Query |
getBooleanQuery(List<BooleanClause> clauses,
boolean disableCoord)
Deprecated.
|
DateTools.Resolution |
getDateResolution(String fieldName)
Deprecated.
|
QueryParserWrapper.Operator |
getDefaultOperator()
Deprecated.
|
boolean |
getEnablePositionIncrements()
Deprecated.
|
String |
getField()
Deprecated.
|
protected Query |
getFieldQuery(String field,
String queryText)
Deprecated.
Use
getFieldQuery(String, String, boolean) instead |
protected Query |
getFieldQuery(String field,
String queryText,
boolean quoted)
Deprecated.
|
protected Query |
getFieldQuery(String field,
String queryText,
int slop)
Deprecated.
Base implementation delegates to
getFieldQuery(String,String) . |
float |
getFuzzyMinSim()
Deprecated.
|
int |
getFuzzyPrefixLength()
Deprecated.
|
protected Query |
getFuzzyQuery(String field,
String termStr,
float minSimilarity)
Deprecated.
|
Locale |
getLocale()
Deprecated.
|
boolean |
getLowercaseExpandedTerms()
Deprecated.
|
MultiTermQuery.RewriteMethod |
getMultiTermRewriteMethod()
Deprecated.
|
int |
getPhraseSlop()
Deprecated.
|
protected Query |
getPrefixQuery(String field,
String termStr)
Deprecated.
|
QueryConfigHandler |
getQueryConfigHandler()
Deprecated.
Returns the query config handler used by this query parser
|
QueryNodeProcessor |
getQueryProcessor()
Deprecated.
Returns
QueryNodeProcessor used to process the query node tree
generated by the
StandardSyntaxParser . |
Collator |
getRangeCollator()
Deprecated.
|
protected Query |
getRangeQuery(String field,
String part1,
String part2,
boolean inclusive)
Deprecated.
|
boolean |
getUseOldRangeQuery()
Deprecated.
|
protected Query |
getWildcardQuery(String field,
String termStr)
Deprecated.
|
Query |
parse(String query)
Deprecated.
|
void |
setAllowLeadingWildcard(boolean allowLeadingWildcard)
Deprecated.
|
void |
setDateResolution(DateTools.Resolution dateResolution)
Deprecated.
|
void |
setDateResolution(String fieldName,
DateTools.Resolution dateResolution)
Deprecated.
|
void |
setDefaultOperator(QueryParserWrapper.Operator op)
Deprecated.
|
void |
setEnablePositionIncrements(boolean enable)
Deprecated.
|
void |
setFuzzyMinSim(float fuzzyMinSim)
Deprecated.
|
void |
setFuzzyPrefixLength(int fuzzyPrefixLength)
Deprecated.
|
void |
setLocale(Locale locale)
Deprecated.
|
void |
setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
Deprecated.
|
void |
setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
Deprecated.
|
void |
setPhraseSlop(int phraseSlop)
Deprecated.
|
void |
setQueryBuilder(StandardQueryBuilder builder)
Deprecated.
Sets the
StandardQueryBuilder used to generate a Query
object from the parsed and processed query node tree. |
void |
setQueryConfig(StandardQueryConfigHandler queryConfig)
Deprecated.
Sets the
QueryConfigHandler used by the QueryNodeProcessor
set to this object. |
void |
setQueryProcessor(QueryNodeProcessor processor)
Deprecated.
Sets the
QueryNodeProcessor used to process the query node tree
generated by the
StandardSyntaxParser . |
void |
setRangeCollator(Collator rc)
Deprecated.
|
void |
setUseOldRangeQuery(boolean useOldRangeQuery)
Deprecated.
|
public static final QueryParserWrapper.Operator AND_OPERATOR
public static final QueryParserWrapper.Operator OR_OPERATOR
public static String escape(String s)
\
.public String getField()
public Analyzer getAnalyzer()
public void setQueryBuilder(StandardQueryBuilder builder)
StandardQueryBuilder
used to generate a Query
object from the parsed and processed query node tree.builder
- the builderpublic void setQueryProcessor(QueryNodeProcessor processor)
QueryNodeProcessor
used to process the query node tree
generated by the
StandardSyntaxParser
.processor
- the processorpublic void setQueryConfig(StandardQueryConfigHandler queryConfig)
QueryConfigHandler
used by the QueryNodeProcessor
set to this object.queryConfig
- the query config handlerpublic QueryConfigHandler getQueryConfigHandler()
public QueryNodeProcessor getQueryProcessor()
QueryNodeProcessor
used to process the query node tree
generated by the
StandardSyntaxParser
.public ParseException generateParseException()
public boolean getAllowLeadingWildcard()
public MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()
public DateTools.Resolution getDateResolution(String fieldName)
public boolean getEnablePositionIncrements()
public float getFuzzyMinSim()
public int getFuzzyPrefixLength()
public Locale getLocale()
public boolean getLowercaseExpandedTerms()
public int getPhraseSlop()
public Collator getRangeCollator()
public boolean getUseOldRangeQuery()
public Query parse(String query) throws ParseException
ParseException
public void setAllowLeadingWildcard(boolean allowLeadingWildcard)
public void setMultiTermRewriteMethod(MultiTermQuery.RewriteMethod method)
public void setDateResolution(DateTools.Resolution dateResolution)
public void setDateResolution(String fieldName, DateTools.Resolution dateResolution)
public void setDefaultOperator(QueryParserWrapper.Operator op)
public QueryParserWrapper.Operator getDefaultOperator()
public void setEnablePositionIncrements(boolean enable)
public void setFuzzyMinSim(float fuzzyMinSim)
public void setFuzzyPrefixLength(int fuzzyPrefixLength)
public void setLocale(Locale locale)
public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)
public void setPhraseSlop(int phraseSlop)
public void setRangeCollator(Collator rc)
public void setUseOldRangeQuery(boolean useOldRangeQuery)
protected Query getPrefixQuery(String field, String termStr) throws ParseException
ParseException
protected Query getWildcardQuery(String field, String termStr) throws ParseException
ParseException
protected Query getFuzzyQuery(String field, String termStr, float minSimilarity) throws ParseException
ParseException
@Deprecated protected Query getFieldQuery(String field, String queryText) throws ParseException
getFieldQuery(String, String, boolean)
insteadParseException
protected Query getFieldQuery(String field, String queryText, boolean quoted) throws ParseException
ParseException
- throw in overridden method to disallowprotected Query getBooleanQuery(List<BooleanClause> clauses, boolean disableCoord) throws ParseException
ParseException
protected Query getFieldQuery(String field, String queryText, int slop) throws ParseException
getFieldQuery(String,String)
.
This method may be overridden, for example, to return a SpanNearQuery
instead of a PhraseQuery.ParseException
- throw in overridden method to disallowprotected Query getRangeQuery(String field, String part1, String part2, boolean inclusive) throws ParseException
ParseException
- throw in overridden method to disallow