public class KeywordSyntaxParser extends Object implements org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser, KeywordSyntaxParserConstants
The field semantic of :
is replaced by the semantic of
TwigQuery
.
Modifier and Type | Field and Description |
---|---|
org.apache.lucene.queryparser.flexible.standard.parser.Token |
jj_nt
Next token.
|
org.apache.lucene.queryparser.flexible.standard.parser.Token |
token
Current token.
|
KeywordSyntaxParserTokenManager |
token_source
Generated Token Manager.
|
_ESCAPED_CHAR, _NUM_CHAR, _PROTECTED_CHAR, _QUOTED_CHAR, _TERM_CHAR, _TERM_START_CHAR, _WHITESPACE, AND, Boost, CARAT, COMMA, DATATYPE, DEFAULT, EOF, FUZZY_SLOP, LPAREN, MINUS, NOT, NUMBER, OP_COLON, OP_OBJECT_END, OP_OBJECT_START, OR, PLUS, PROTECTED, QUOTED, Range, RANGEEX_GOOP_END, RANGEEX_GOOP_START, RANGEEX_QUOTED_END, RANGEEX_QUOTED_START, RANGEIN_END, RANGEIN_GOOP_END, RANGEIN_GOOP_START, RANGEIN_QUOTED_END, RANGEIN_QUOTED_START, RANGEIN_START, REGEXPTERM, RPAREN, TERM, tokenImage
Constructor and Description |
---|
KeywordSyntaxParser() |
KeywordSyntaxParser(org.apache.lucene.queryparser.classic.CharStream stream)
Constructor with user supplied CharStream.
|
KeywordSyntaxParser(KeywordSyntaxParserTokenManager tm)
Constructor with generated Token Manager.
|
Modifier and Type | Method and Description |
---|---|
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
Array(CharSequence field) |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
Clause(CharSequence field) |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
ConjQuery(CharSequence field) |
int |
Conjunction() |
void |
disable_tracing()
Disable tracing.
|
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
DisjQuery(CharSequence field) |
void |
enable_tracing()
Enable tracing.
|
org.apache.lucene.queryparser.flexible.standard.parser.ParseException |
generateParseException()
Generate ParseException.
|
org.apache.lucene.queryparser.flexible.standard.parser.Token |
getNextToken()
Get the next Token.
|
org.apache.lucene.queryparser.flexible.standard.parser.Token |
getToken(int index)
Get the specific Token.
|
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
ModClause(CharSequence field) |
org.apache.lucene.queryparser.flexible.core.nodes.ModifierQueryNode.Modifier |
Modifiers() |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
Object(CharSequence field) |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
parse(CharSequence query,
CharSequence field)
Parses a query string, returning a
QueryNode . |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
Query(CharSequence field) |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
Query2(CharSequence field) |
void |
ReInit(org.apache.lucene.queryparser.classic.CharStream stream)
Reinitialise.
|
void |
ReInit(KeywordSyntaxParserTokenManager tm)
Reinitialise.
|
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
Term(CharSequence field) |
org.apache.lucene.queryparser.flexible.core.nodes.QueryNode |
TopLevelQuery(CharSequence field) |
public KeywordSyntaxParserTokenManager token_source
public org.apache.lucene.queryparser.flexible.standard.parser.Token token
public org.apache.lucene.queryparser.flexible.standard.parser.Token jj_nt
public KeywordSyntaxParser()
public KeywordSyntaxParser(org.apache.lucene.queryparser.classic.CharStream stream)
public KeywordSyntaxParser(KeywordSyntaxParserTokenManager tm)
public org.apache.lucene.queryparser.flexible.core.nodes.QueryNode parse(CharSequence query, CharSequence field) throws org.apache.lucene.queryparser.flexible.core.QueryNodeParseException
QueryNode
.parse
in interface org.apache.lucene.queryparser.flexible.core.parser.SyntaxParser
query
- the query string to be parsed.ParseException
- if the parsing failsorg.apache.lucene.queryparser.flexible.core.QueryNodeParseException
public final int Conjunction() throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.ModifierQueryNode.Modifier Modifiers() throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode TopLevelQuery(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode Query(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode Object(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode Array(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode Query2(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode DisjQuery(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode ConjQuery(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode ModClause(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode Clause(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public final org.apache.lucene.queryparser.flexible.core.nodes.QueryNode Term(CharSequence field) throws org.apache.lucene.queryparser.flexible.standard.parser.ParseException
org.apache.lucene.queryparser.flexible.standard.parser.ParseException
public void ReInit(org.apache.lucene.queryparser.classic.CharStream stream)
public void ReInit(KeywordSyntaxParserTokenManager tm)
public final org.apache.lucene.queryparser.flexible.standard.parser.Token getNextToken()
public final org.apache.lucene.queryparser.flexible.standard.parser.Token getToken(int index)
public org.apache.lucene.queryparser.flexible.standard.parser.ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © 2014. All rights reserved.