List of usage examples for org.apache.lucene.queryparser.flexible.core.config QueryConfigHandler set
public <T> void set(ConfigurationKey<T> key, T value)
From source file:com.sindicetech.siren.qparser.keyword.processors.ChangeDefaultOperatorNodeProcessor.java
License:Open Source License
@Override protected QueryNode postProcessNode(final QueryNode node) throws QueryNodeException { if (node.getParent() == null) { // node is root, we processed the tree if (hasUnaryReqOperator) { // we found a req modifier in the tree final QueryConfigHandler conf = this.getQueryConfigHandler(); if (!conf.has(ConfigurationKeys.DEFAULT_OPERATOR)) { throw new IllegalArgumentException( "ConfigurationKeys.DEFAULT_OPERATOR should be set on the QueryConfigHandler"); }// w w w . j a v a 2 s. co m conf.set(ConfigurationKeys.DEFAULT_OPERATOR, Operator.OR); } } return node; }