public class CoreParser extends Object implements QueryBuilder, SpanQueryBuilder
Modifier and Type | Field and Description |
---|---|
protected Analyzer |
analyzer |
protected String |
defaultField |
protected QueryParser |
parser |
protected QueryBuilderFactory |
queryFactory |
protected SpanQueryBuilderFactory |
spanFactory |
Modifier | Constructor and Description |
---|---|
|
CoreParser(Analyzer analyzer,
QueryParser parser)
Construct an XML parser that uses a single instance QueryParser for handling
UserQuery tags - all parse operations are synchronised on this parser
|
|
CoreParser(String defaultField,
Analyzer analyzer)
Constructs an XML parser that creates a QueryParser for each UserQuery request.
|
protected |
CoreParser(String defaultField,
Analyzer analyzer,
QueryParser parser) |
Modifier and Type | Method and Description |
---|---|
void |
addQueryBuilder(String nodeName,
QueryBuilder builder) |
void |
addSpanBuilder(String nodeName,
SpanQueryBuilder builder) |
void |
addSpanQueryBuilder(String nodeName,
SpanQueryBuilder builder) |
Query |
getQuery(Element e) |
SpanQuery |
getSpanQuery(Element e) |
Query |
parse(InputStream xmlStream) |
protected String defaultField
protected Analyzer analyzer
protected QueryParser parser
protected QueryBuilderFactory queryFactory
protected final SpanQueryBuilderFactory spanFactory
public CoreParser(Analyzer analyzer, QueryParser parser)
parser
- A QueryParser which will be synchronized on during parse calls.public CoreParser(String defaultField, Analyzer analyzer)
defaultField
- The default field name used by QueryParsers constructed for UserQuery tagsprotected CoreParser(String defaultField, Analyzer analyzer, QueryParser parser)
public Query parse(InputStream xmlStream) throws ParserException
ParserException
public void addQueryBuilder(String nodeName, QueryBuilder builder)
public void addSpanBuilder(String nodeName, SpanQueryBuilder builder)
public void addSpanQueryBuilder(String nodeName, SpanQueryBuilder builder)
public Query getQuery(Element e) throws ParserException
getQuery
in interface QueryBuilder
ParserException
public SpanQuery getSpanQuery(Element e) throws ParserException
getSpanQuery
in interface SpanQueryBuilder
ParserException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.