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, SolrQueryParserBase.SynonymQueryStyle
QueryBuilder.TermAndBoost
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, synonymQueryStyle, 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,
SolrQueryParserBase.SynonymQueryStyle synonymQueryStyle) |
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, getExistenceQuery, getExplicitField, getField, getFieldQuery, getFieldQuery, getFieldQuery, getFieldQuery, getFuzzyMinSim, getFuzzyPrefixLength, getFuzzyQuery, getLocalParams, getMultiTermRewriteMethod, getPhraseSlop, getPrefixQuery, getRangeQuery, getRangeQueryImpl, getRegexpQuery, getReversedWildcardFilterFactory, getSynonymQueryStyle, getWildcardQuery, init, isAllowSubQueryParsing, isRangeShouldBeProtectedFromReverse, newBooleanClause, newFuzzyQuery, newGraphSynonymQuery, newMatchAllDocsQuery, newPrefixQuery, newRegexpQuery, newSynonymQuery, newWildcardQuery, parse, setAllowLeadingWildcard, setAllowSubQueryParsing, setAutoGeneratePhraseQueries, setDefaultOperator, setFuzzyMinSim, setFuzzyPrefixLength, setMultiTermRewriteMethod, setPhraseSlop, setSynonymQueryStyle
add, analyzeBoolean, analyzeGraphBoolean, analyzeGraphPhrase, analyzeMultiBoolean, analyzeMultiPhrase, analyzePhrase, analyzeTerm, createBooleanQuery, createBooleanQuery, createFieldQuery, createFieldQuery, createMinShouldMatchQuery, createPhraseQuery, createPhraseQuery, createSpanQuery, getAnalyzer, getAutoGenerateMultiTermSynonymsPhraseQuery, getEnableGraphQueries, getEnablePositionIncrements, newBooleanQuery, newMultiPhraseQueryBuilder, 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)
false
.protected Query newFieldQuery(Analyzer analyzer, String field, String queryText, boolean quoted, boolean fieldAutoGenPhraseQueries, boolean fieldEnableGraphQueries, SolrQueryParserBase.SynonymQueryStyle synonymQueryStyle) 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-2021 Apache Software Foundation. All Rights Reserved.