List of usage examples for org.apache.lucene.queryparser.flexible.core.nodes QueryNode set
public void set(List<QueryNode> children);
From source file:com.sindicetech.siren.qparser.keyword.processors.GroupQueryNodeProcessor.java
License:Open Source License
public QueryNode process(QueryNode queryTree) throws QueryNodeException { if (!this.getQueryConfigHandler().has(ConfigurationKeys.DEFAULT_OPERATOR)) { throw new IllegalArgumentException("DEFAULT_OPERATOR should be set on the QueryConfigHandler"); }/*from ww w . j a va 2s . c o m*/ this.usingAnd = Operator.AND == this.getQueryConfigHandler().get(ConfigurationKeys.DEFAULT_OPERATOR) ? true : false; if (queryTree instanceof GroupQueryNode) { queryTree = ((GroupQueryNode) queryTree).getChild(); } this.queryNodeList = new ArrayList<QueryNode>(); this.latestNodeVerified = false; this.readTree(queryTree); if (queryTree instanceof BooleanQueryNode) { queryTree.set(this.queryNodeList); return queryTree; } else { return new BooleanQueryNode(this.queryNodeList); } }