public class QueryParser extends SolrQueryParserBase implements QueryParserConstants
Modifier and Type | Class and Description |
---|---|
static class |
QueryParser.Operator
The default operator for parsing queries.
|
SolrQueryParserBase.MagicFieldName, SolrQueryParserBase.RawQuery
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_SPLIT_ON_WHITESPACE
default split on whitespace behavior
|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
QueryParserTokenManager |
token_source
Generated Token Manager.
|
AND_OPERATOR, explicitField, operator, OR_OPERATOR, parser, REVERSE_WILDCARD_LOWER_BOUND, schema, TERMS_QUERY_THRESHOLD
analyzer, autoGenerateMultiTermSynonymsPhraseQuery, enableGraphQueries, enablePositionIncrements
_ESCAPED_CHAR, _NUM_CHAR, _QUOTED_CHAR, _SQUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, BAREOPER, Boost, CARAT, COLON, COMMENT, DEFAULT, EOF, FILTER, FUZZY_SLOP, LPARAMS, LPAREN, MINUS, NOT, NUMBER, OR, PLUS, PREFIXTERM, QUOTED, Range, RANGE_GOOP, RANGE_QUOTED, RANGE_TO, RANGEEX_END, RANGEEX_START, RANGEIN_END, RANGEIN_START, REGEXPTERM, RPAREN, STAR, TERM, tokenImage, WILDTERM
Modifier | Constructor and Description |
---|---|
protected |
QueryParser(CharStream stream)
Constructor with user supplied CharStream.
|
protected |
QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.
|
|
QueryParser(String defaultField,
QParser parser) |
Modifier and Type | Method and Description |
---|---|
Query |
Clause(String field) |
int |
Conjunction() |
void |
disable_tracing()
Disable tracing.
|
void |
enable_tracing()
Enable tracing.
|
ParseException |
generateParseException()
Generate ParseException.
|
Token |
getNextToken()
Get the next Token.
|
boolean |
getSplitOnWhitespace() |
Token |
getToken(int index)
Get the specific Token.
|
int |
Modifiers() |
void |
MultiTerm(String field,
List<BooleanClause> clauses) |
protected Query |
newFieldQuery(Analyzer analyzer,
String field,
String queryText,
boolean quoted,
boolean fieldAutoGenPhraseQueries,
boolean fieldEnableGraphQueries) |
Query |
Query(String field) |
void |
ReInit(CharStream stream)
Reinitialise.
|
void |
ReInit(QueryParserTokenManager tm)
Reinitialise.
|
void |
setSplitOnWhitespace(boolean splitOnWhitespace)
Whether query text should be split on whitespace prior to analysis.
|
Query |
Term(String field) |
Query |
TopLevelQuery(String field) |
addClause, addMultiTermClause, analyzeIfMultitermTermText, escape, getAllowLeadingWildcard, getAutoGeneratePhraseQueries, getBooleanQuery, getDefaultField, getDefaultOperator, getExplicitField, getField, getFieldQuery, getFieldQuery, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getFuzzyQuery, getLocalParams, getMultiTermRewriteMethod, getPhraseSlop, getPrefixQuery, getRangeQuery, getRangeQueryImpl, getRegexpQuery, getReversedWildcardFilterFactory, getWildcardQuery, init, isRangeShouldBeProtectedFromReverse, newBooleanClause, newFuzzyQuery, newMatchAllDocsQuery, newPrefixQuery, newRegexpQuery, newWildcardQuery, parse, setAllowLeadingWildcard, setAutoGeneratePhraseQueries, setDefaultOperator, setFuzzyMinSim, setFuzzyPrefixLength, setMultiTermRewriteMethod, setPhraseSlop
add, analyzeBoolean, analyzeGraphBoolean, analyzeGraphPhrase, analyzeMultiBoolean, analyzeMultiPhrase, analyzePhrase, analyzeTerm, createBooleanQuery, createBooleanQuery, createFieldQuery, createFieldQuery, createMinShouldMatchQuery, createPhraseQuery, createPhraseQuery, createSpanQuery, getAnalyzer, getAutoGenerateMultiTermSynonymsPhraseQuery, getEnableGraphQueries, getEnablePositionIncrements, newBooleanQuery, newGraphSynonymQuery, newMultiPhraseQueryBuilder, newSynonymQuery, newTermQuery, setAnalyzer, setAutoGenerateMultiTermSynonymsPhraseQuery, setEnableGraphQueries, setEnablePositionIncrements
public static final boolean DEFAULT_SPLIT_ON_WHITESPACE
public QueryParserTokenManager token_source
public Token token
public Token jj_nt
protected QueryParser(CharStream stream)
protected QueryParser(QueryParserTokenManager tm)
public boolean getSplitOnWhitespace()
setSplitOnWhitespace(boolean)
public void setSplitOnWhitespace(boolean splitOnWhitespace)
true
.protected Query newFieldQuery(Analyzer analyzer, String field, String queryText, boolean quoted, boolean fieldAutoGenPhraseQueries, boolean fieldEnableGraphQueries) throws SyntaxError
newFieldQuery
in class SolrQueryParserBase
SyntaxError
public final int Conjunction() throws ParseException
ParseException
public final int Modifiers() throws ParseException
ParseException
public final Query TopLevelQuery(String field) throws ParseException, SyntaxError
TopLevelQuery
in class SolrQueryParserBase
ParseException
SyntaxError
public final Query Query(String field) throws ParseException, SyntaxError
ParseException
SyntaxError
public final Query Clause(String field) throws ParseException, SyntaxError
ParseException
SyntaxError
public final Query Term(String field) throws ParseException, SyntaxError
ParseException
SyntaxError
public final void MultiTerm(String field, List<BooleanClause> clauses) throws ParseException, SyntaxError
ParseException
SyntaxError
public void ReInit(CharStream stream)
ReInit
in class SolrQueryParserBase
public void ReInit(QueryParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.