This class is a helper that enables to create easily a boolean of twig queries.
To construct a {@link Query} object from a query string, use the{@link #parse(String,String)} method:
KeywordQueryParser queryParser = new KeywordQueryParser();
Query query = queryParser.parse("a : b", "sirenField");
To change any configuration before parsing the query string do, for example:
queryParser.getQueryConfigHandler().setDefaultOperator(Operator.AND);
or use the setter methods:
queryParser.setDefaultOperator(Operator.AND);
Examples of appropriately formatted queries can be found in the query syntax documentation.
The text parser used by this helper is a {@link KeywordSyntaxParser}. The BNF grammar of this parser is available here.
The {@link QueryConfigHandler} used by this helper is a{@link KeywordQueryConfigHandler}.
The query node processor used by this helper is a {@link KeywordQueryNodeProcessorPipeline}.
The builder used by this helper is a {@link KeywordQueryTreeBuilder}.
@see KeywordQueryConfigHandler
@see KeywordSyntaxParser
@see KeywordQueryNodeProcessorPipeline
@see KeywordQueryTreeBuilder