Class UserInputQueryBuilder
- java.lang.Object
-
- org.apache.lucene.queryparser.xml.builders.UserInputQueryBuilder
-
- All Implemented Interfaces:
QueryBuilder
public class UserInputQueryBuilder extends Object implements QueryBuilder
UserInputQueryBuilder uses 1 of 2 strategies for thread-safe parsing: 1) Synchronizing access to "parse" calls on a previously supplied QueryParser or.. 2) creating a new QueryParser object for each parse request
-
-
Constructor Summary
Constructors Constructor Description UserInputQueryBuilder(String defaultField, Analyzer analyzer)
UserInputQueryBuilder(QueryParser parser)
This constructor has the disadvantage of not being able to change choice of default field name
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected QueryParser
createQueryParser(String fieldName, Analyzer analyzer)
Method to create a QueryParser - designed to be overriddenQuery
getQuery(Element e)
-
-
-
Constructor Detail
-
UserInputQueryBuilder
public UserInputQueryBuilder(QueryParser parser)
This constructor has the disadvantage of not being able to change choice of default field name- Parameters:
parser
- thread un-safe query parser
-
-
Method Detail
-
getQuery
public Query getQuery(Element e) throws ParserException
- Specified by:
getQuery
in interfaceQueryBuilder
- Throws:
ParserException
-
createQueryParser
protected QueryParser createQueryParser(String fieldName, Analyzer analyzer)
Method to create a QueryParser - designed to be overridden- Returns:
- QueryParser
-
-