org.apache.lucene.xmlparser
Class CoreParser
java.lang.Object
org.apache.lucene.xmlparser.CoreParser
- All Implemented Interfaces:
- QueryBuilder
- Direct Known Subclasses:
- CorePlusExtensionsParser
public class CoreParser
- extends Object
- implements QueryBuilder
Assembles a QueryBuilder which uses only core Lucene Query objects
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
analyzer
protected Analyzer analyzer
parser
protected QueryParser parser
queryFactory
protected QueryBuilderFactory queryFactory
filterFactory
protected FilterBuilderFactory filterFactory
maxNumCachedFilters
public static int maxNumCachedFilters
CoreParser
public 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
- Parameters:
analyzer
- parser
- A QueryParser which will be synchronized on during parse calls.
CoreParser
public CoreParser(String defaultField,
Analyzer analyzer)
- Constructs an XML parser that creates a QueryParser for each UserQuery request.
- Parameters:
defaultField
- The default field name used by QueryParsers constructed for UserQuery tagsanalyzer
-
CoreParser
protected CoreParser(String defaultField,
Analyzer analyzer,
QueryParser parser)
parse
public Query parse(InputStream xmlStream)
throws ParserException
- Throws:
ParserException
addQueryBuilder
public void addQueryBuilder(String nodeName,
QueryBuilder builder)
addFilterBuilder
public void addFilterBuilder(String nodeName,
FilterBuilder builder)
getQuery
public Query getQuery(Element e)
throws ParserException
- Specified by:
getQuery
in interface QueryBuilder
- Throws:
ParserException
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.