## org.apache.lucene.queryParser.standard
Class QueryParserWrapper

    java.lang.Object
      org.apache.lucene.queryParser.standard.QueryParserWrapper

Direct Known Subclasses:
  MultiFieldQueryParserWrapper

Deprecated. this class will be removed soon, it's a temporary class to be used along the transition from the old query parser to the new one

    public class QueryParserWrapper

extends java.lang.Object

This class performs the query parsing using the new query parser implementation, but keeps the old `QueryParser` API.
This class should be used when the new query parser features are and the old `QueryParser` API are needed at the same time.

Nested Class Summary
`static class` `QueryParserWrapper.Operator` Deprecated. The default operator for parsing queries.

Field Summary
`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 Summary
`QueryParserWrapper(java.lang.String defaultField, org.apache.lucene.analysis.Analyzer analyzer)` Deprecated.

Method Summary
`static java.lang.String` `escape(java.lang.String s)` Deprecated. Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding `\`.
`org.apache.lucene.queryParser.ParseException` `generateParseException()` Deprecated.
`boolean` `getAllowLeadingWildcard()` Deprecated.
`org.apache.lucene.analysis.Analyzer` `getAnalyzer()` Deprecated.
`protected org.apache.lucene.search.Query` `getBooleanQuery(java.util.List clauses, boolean disableCoord)` Deprecated.
`org.apache.lucene.document.DateTools.Resolution` `getDateResolution(java.lang.String fieldName)` Deprecated.
`QueryParserWrapper.Operator` `getDefaultOperator()` Deprecated.
`boolean` `getEnablePositionIncrements()` Deprecated.
`java.lang.String` `getField()` Deprecated.
`protected org.apache.lucene.search.Query` `getFieldQuery(java.lang.String field, java.lang.String queryText)` Deprecated.
`protected org.apache.lucene.search.Query` `getFieldQuery(java.lang.String field, java.lang.String queryText, int slop)` Deprecated. Base implementation delegates to `getFieldQuery(String,String)`.
`float` `getFuzzyMinSim()` Deprecated.
`int` `getFuzzyPrefixLength()` Deprecated.
`protected org.apache.lucene.search.Query` `getFuzzyQuery(java.lang.String field, java.lang.String termStr, float minSimilarity)` Deprecated.
`java.util.Locale` `getLocale()` Deprecated.
`boolean` `getLowercaseExpandedTerms()` Deprecated.
`org.apache.lucene.search.MultiTermQuery.RewriteMethod` `getMultiTermRewriteMethod()` Deprecated.
`int` `getPhraseSlop()` Deprecated.
`protected org.apache.lucene.search.Query` `getPrefixQuery(java.lang.String field, java.lang.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`.
`java.text.Collator` `getRangeCollator()` Deprecated.
`protected org.apache.lucene.search.Query` `getRangeQuery(java.lang.String field, java.lang.String part1, java.lang.String part2, boolean inclusive)` Deprecated.
`boolean` `getUseOldRangeQuery()` Deprecated.
`protected org.apache.lucene.search.Query` `getWildcardQuery(java.lang.String field, java.lang.String termStr)` Deprecated.
`org.apache.lucene.search.Query` `parse(java.lang.String query)` Deprecated.
`void` `setAllowLeadingWildcard(boolean allowLeadingWildcard)` Deprecated.
`void` `setDateResolution(org.apache.lucene.document.DateTools.Resolution dateResolution)` Deprecated.
`void` `setDateResolution(java.lang.String fieldName, org.apache.lucene.document.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(java.util.Locale locale)` Deprecated.
`void` `setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)` Deprecated.
`void` `setMultiTermRewriteMethod(org.apache.lucene.search.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(java.text.Collator rc)` Deprecated.
`void` `setUseOldRangeQuery(boolean useOldRangeQuery)` Deprecated.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### AND_OPERATOR

    public static final QueryParserWrapper.Operator AND_OPERATOR

  Deprecated.
  Alternative form of QueryParser.Operator.AND

### OR_OPERATOR

    public static final QueryParserWrapper.Operator OR_OPERATOR

  Deprecated.
  Alternative form of QueryParser.Operator.OR

Constructor Detail

### QueryParserWrapper

    public QueryParserWrapper(java.lang.String defaultField,
                              org.apache.lucene.analysis.Analyzer analyzer)

  Deprecated.

Method Detail

### escape

    public static java.lang.String escape(java.lang.String s)

  Deprecated.
  Returns a String where those characters that QueryParser expects to be escaped are escaped by a preceding `\`.

### getField

    public java.lang.String getField()

  Deprecated.

### getAnalyzer

    public org.apache.lucene.analysis.Analyzer getAnalyzer()

  Deprecated.

### setQueryBuilder

    public void setQueryBuilder(StandardQueryBuilder builder)

  Deprecated.
  Sets the `StandardQueryBuilder` used to generate a `Query` object from the parsed and processed query node tree.

  Parameters:
    `builder` - the builder

### setQueryProcessor

    public void setQueryProcessor(QueryNodeProcessor processor)

  Deprecated.
  Sets the `QueryNodeProcessor` used to process the query node tree generated by the `StandardSyntaxParser`.

  Parameters:
    `processor` - the processor

### setQueryConfig

    public void setQueryConfig(StandardQueryConfigHandler queryConfig)

  Deprecated.
  Sets the `QueryConfigHandler` used by the `QueryNodeProcessor` set to this object.

  Parameters:
    `queryConfig` - the query config handler

### getQueryConfigHandler

    public QueryConfigHandler getQueryConfigHandler()

  Deprecated.
  Returns the query config handler used by this query parser

  Returns:
    the query config handler

### getQueryProcessor

    public QueryNodeProcessor getQueryProcessor()

  Deprecated.
  Returns `QueryNodeProcessor` used to process the query node tree generated by the `StandardSyntaxParser`.

  Returns:
    the query processor

### generateParseException

    public org.apache.lucene.queryParser.ParseException generateParseException()

  Deprecated.

### getAllowLeadingWildcard

    public boolean getAllowLeadingWildcard()

  Deprecated.

### getMultiTermRewriteMethod

    public org.apache.lucene.search.MultiTermQuery.RewriteMethod getMultiTermRewriteMethod()

  Deprecated.

### getDateResolution

    public org.apache.lucene.document.DateTools.Resolution getDateResolution(java.lang.String fieldName)

  Deprecated.

### getEnablePositionIncrements

    public boolean getEnablePositionIncrements()

  Deprecated.

### getFuzzyMinSim

    public float getFuzzyMinSim()

  Deprecated.

### getFuzzyPrefixLength

    public int getFuzzyPrefixLength()

  Deprecated.

### getLocale

    public java.util.Locale getLocale()

  Deprecated.

### getLowercaseExpandedTerms

    public boolean getLowercaseExpandedTerms()

  Deprecated.

### getPhraseSlop

    public int getPhraseSlop()

  Deprecated.

### getRangeCollator

    public java.text.Collator getRangeCollator()

  Deprecated.

### getUseOldRangeQuery

    public boolean getUseOldRangeQuery()

  Deprecated.

### parse

    public org.apache.lucene.search.Query parse(java.lang.String query)
                                         throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException`

### setAllowLeadingWildcard

    public void setAllowLeadingWildcard(boolean allowLeadingWildcard)

  Deprecated.

### setMultiTermRewriteMethod

    public void setMultiTermRewriteMethod(org.apache.lucene.search.MultiTermQuery.RewriteMethod method)

  Deprecated.

### setDateResolution

    public void setDateResolution(org.apache.lucene.document.DateTools.Resolution dateResolution)

  Deprecated.

### setDateResolution

    public void setDateResolution(java.lang.String fieldName,
                                  org.apache.lucene.document.DateTools.Resolution dateResolution)

  Deprecated.

### setDefaultOperator

    public void setDefaultOperator(QueryParserWrapper.Operator op)

  Deprecated.

### getDefaultOperator

    public QueryParserWrapper.Operator getDefaultOperator()

  Deprecated.

### setEnablePositionIncrements

    public void setEnablePositionIncrements(boolean enable)

  Deprecated.

### setFuzzyMinSim

    public void setFuzzyMinSim(float fuzzyMinSim)

  Deprecated.

### setFuzzyPrefixLength

    public void setFuzzyPrefixLength(int fuzzyPrefixLength)

  Deprecated.

### setLocale

    public void setLocale(java.util.Locale locale)

  Deprecated.

### setLowercaseExpandedTerms

    public void setLowercaseExpandedTerms(boolean lowercaseExpandedTerms)

  Deprecated.

### setPhraseSlop

    public void setPhraseSlop(int phraseSlop)

  Deprecated.

### setRangeCollator

    public void setRangeCollator(java.text.Collator rc)

  Deprecated.

### setUseOldRangeQuery

    public void setUseOldRangeQuery(boolean useOldRangeQuery)

  Deprecated.

### getPrefixQuery

    protected org.apache.lucene.search.Query getPrefixQuery(java.lang.String field,
                                                            java.lang.String termStr)
                                                     throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException`

### getWildcardQuery

    protected org.apache.lucene.search.Query getWildcardQuery(java.lang.String field,
                                                              java.lang.String termStr)
                                                       throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException`

### getFuzzyQuery

    protected org.apache.lucene.search.Query getFuzzyQuery(java.lang.String field,
                                                           java.lang.String termStr,
                                                           float minSimilarity)
                                                    throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException`

### getFieldQuery

    protected org.apache.lucene.search.Query getFieldQuery(java.lang.String field,
                                                           java.lang.String queryText)
                                                    throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException` - throw in overridden method to disallow

### getBooleanQuery

    protected org.apache.lucene.search.Query getBooleanQuery(java.util.List clauses,
                                                             boolean disableCoord)
                                                      throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException`

### getFieldQuery

    protected org.apache.lucene.search.Query getFieldQuery(java.lang.String field,
                                                           java.lang.String queryText,
                                                           int slop)
                                                    throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Base implementation delegates to `getFieldQuery(String,String)`. This method may be overridden, for example, to return a SpanNearQuery instead of a PhraseQuery.

  Throws:
    `org.apache.lucene.queryParser.ParseException` - throw in overridden method to disallow

### getRangeQuery

    protected org.apache.lucene.search.Query getRangeQuery(java.lang.String field,
                                                           java.lang.String part1,
                                                           java.lang.String part2,
                                                           boolean inclusive)
                                                    throws org.apache.lucene.queryParser.ParseException

  Deprecated.
  Throws:
    `org.apache.lucene.queryParser.ParseException` - throw in overridden method to disallow

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.