public BooleanQuery build(QueryNode queryNode) throws QueryNodeException {BooleanQueryNode booleanNode = (BooleanQueryNode) queryNode;BooleanQuery.Builder bQuery = new BooleanQuery.Builder();List<QueryNode> children = booleanNode.getChildren();if (children != null) {for (QueryNode child : children) {Object obj = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);if (obj != null) {Query query = (Query) obj;try {bQuery.add(query, getModifierValue(child));} catch (TooManyClauses ex) {throw new QueryNodeException(new MessageImpl(QueryParserMessages.TOO_MANY_BOOLEAN_CLAUSES, IndexSearcher.getMaxClauseCount(), queryNode.toQueryString(new EscapeQuerySyntaxImpl())), ex);}}}}return bQuery.build();}

public virtual Query Build(IQueryNode queryNode){BooleanQueryNode booleanNode = (BooleanQueryNode)queryNode;BooleanQuery bQuery = new BooleanQuery();IList<IQueryNode> children = booleanNode.GetChildren();if (children != null){foreach (IQueryNode child in children){object obj = child.GetTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);if (obj != null){Query query = (Query)obj;try{bQuery.Add(query, GetModifierValue(child));}catch (BooleanQuery.TooManyClausesException ex){throw new QueryNodeException(new Message(QueryParserMessages.TOO_MANY_BOOLEAN_CLAUSES, BooleanQuery.MaxClauseCount, queryNode.ToQueryString(new EscapeQuerySyntax())), ex);}}}}return bQuery;}
