public class QueryParser extends Object implements QueryParserConstants
| Modifier and Type | Field and Description |
|---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
QueryParserTokenManager |
token_source
Generated Token Manager.
|
_DISTOP_NUM, _NUM_CHAR, _ONE_CHAR, _STAR, _TERM_CHAR, _WHITESPACE, AND, Boost, CARAT, COLON, COMMA, DEFAULT, EOF, LPAREN, N, NOT, NUMBER, OR, QUOTED, RPAREN, SUFFIXTERM, TERM, tokenImage, TRUNCQUOTED, TRUNCTERM, W| Constructor and Description |
|---|
QueryParser() |
QueryParser(CharStream stream)
Constructor with user supplied CharStream.
|
QueryParser(QueryParserTokenManager tm)
Constructor with generated Token Manager.
|
public QueryParserTokenManager token_source
public Token token
public Token jj_nt
public QueryParser()
public QueryParser(CharStream stream)
public QueryParser(QueryParserTokenManager tm)
public static SrndQuery parse(String query) throws ParseException
ParseExceptionpublic SrndQuery parse2(String query) throws ParseException
ParseExceptionprotected static int getOpDistance(String distanceOp)
protected static void checkDistanceSubQueries(DistanceQuery distq, String opName) throws ParseException
ParseExceptionprotected SrndQuery getDistanceQuery(List<SrndQuery> queries, boolean infix, Token dToken, boolean ordered) throws ParseException
ParseExceptionprotected boolean allowedSuffix(String suffixed)
protected boolean allowedTruncation(String truncated)
public final SrndQuery TopSrndQuery() throws ParseException
ParseExceptionpublic final SrndQuery FieldsQuery() throws ParseException
ParseExceptionpublic final ArrayList<String> OptionalFields() throws ParseException
ParseExceptionpublic final SrndQuery OrQuery() throws ParseException
ParseExceptionpublic final SrndQuery AndQuery() throws ParseException
ParseExceptionpublic final SrndQuery NotQuery() throws ParseException
ParseExceptionpublic final SrndQuery NQuery() throws ParseException
ParseExceptionpublic final SrndQuery WQuery() throws ParseException
ParseExceptionpublic final SrndQuery PrimaryQuery() throws ParseException
ParseExceptionpublic final SrndQuery PrefixOperatorQuery() throws ParseException
ParseExceptionpublic final List<SrndQuery> FieldsQueryList() throws ParseException
ParseExceptionpublic final SrndQuery SimpleTerm() throws ParseException
ParseExceptionpublic final void OptionalWeights(SrndQuery q) throws ParseException
ParseExceptionpublic void ReInit(CharStream stream)
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()