Package org.apache.lucene.queryparser.flexible.core.nodes

Examples of org.apache.lucene.queryparser.flexible.core.nodes.BooleanQueryNode


    if (this.getQueryConfigHandler().has(KeywordConfigurationKeys.ALLOW_TWIG)) {
      if (!this.getQueryConfigHandler().get(KeywordConfigurationKeys.ALLOW_TWIG)) {
        // Wraps the children into a BooleanQueryNode, so that the parent
        // pointers are correct.
        // This relies on the BooleanSingleChildOptimizationQueryNodeProcessor
        return new BooleanQueryNode(top.getChildren());
      }
    } else {
      throw new IllegalArgumentException("KeywordConfigurationKeys.ALLOW_TWIG should be set on the KeywordQueryConfigHandler");
    }
    return queryTree;
View Full Code Here


    if (queryTree instanceof BooleanQueryNode) {
      queryTree.set(this.queryNodeList);
      return queryTree;
    }
    else {
      return new BooleanQueryNode(this.queryNodeList);
    }

  }
View Full Code Here

  public BooleanQueryNodeBuilder() {
    // empty constructor
  }

  public Query build(final QueryNode queryNode) throws QueryNodeException {
    final BooleanQueryNode booleanNode = (BooleanQueryNode) queryNode;

    final BooleanQuery bQuery = new BooleanQuery();
    final List<QueryNode> children = booleanNode.getChildren();

    if (children != null) {

      for (final QueryNode child : children) {
        final Object obj = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
View Full Code Here

      queryTree.set(actualQueryNodeList);

      return queryTree;

    } else {
      return new BooleanQueryNode(actualQueryNodeList);
    }

  }
View Full Code Here

           clauses.addElement(first);
       }
       clauses.addElement(c);
    }
        if (clauses != null) {
        {if (true) return new BooleanQueryNode(clauses);}
      } else {
          {if (true) return first;}
      }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

           clauses.addElement(first);
       }
       clauses.addElement(c);
    }
        if (clauses != null) {
        {if (true) return new BooleanQueryNode(clauses);}
      } else {
          {if (true) return first;}
      }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

    // empty constructor
  }

  @Override
  public BooleanQuery build(QueryNode queryNode) throws QueryNodeException {
    BooleanQueryNode booleanNode = (BooleanQueryNode) queryNode;

    BooleanQuery bQuery = new BooleanQuery();
    List<QueryNode> children = booleanNode.getChildren();

    if (children != null) {

      for (QueryNode child : children) {
        Object obj = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
View Full Code Here

  @Override
  public SpanOrQuery build(QueryNode node) throws QueryNodeException {

    // validates node
    BooleanQueryNode booleanNode = (BooleanQueryNode) node;

    List<QueryNode> children = booleanNode.getChildren();
    SpanQuery[] spanQueries = new SpanQuery[children.size()];

    int i = 0;
    for (QueryNode child : children) {
      spanQueries[i++] = (SpanQuery) child
View Full Code Here

      queryTree.set(actualQueryNodeList);

      return queryTree;

    } else {
      return new BooleanQueryNode(actualQueryNodeList);
    }

  }
View Full Code Here

           clauses.addElement(first);
       }
       clauses.addElement(c);
    }
        if (clauses != null) {
        {if (true) return new BooleanQueryNode(clauses);}
      } else {
          {if (true) return first;}
      }
    throw new Error("Missing return statement in function");
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.queryparser.flexible.core.nodes.BooleanQueryNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.