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

Examples of org.apache.lucene.queryparser.flexible.core.nodes.ModifierQueryNode.Modifier


  @Override
  protected QueryNode preProcessNode(final QueryNode node)
  throws QueryNodeException {

    if (node instanceof ModifierQueryNode) {
      final Modifier mod = ((ModifierQueryNode) node).getModifier();
      if (mod == Modifier.MOD_REQ) {
        this.hasUnaryReqOperator = true;
      }
    }
View Full Code Here


    while (elements.hasNext()) {
      final JsonNode element = elements.next();

      // parse occur
      final OccurPropertyParser occurParser = new OccurPropertyParser(element, field);
      Modifier mod = null;
      if (occurParser.isPropertyDefined()) {
        mod = occurParser.parse();
      }

      // check if there is either a node or a twig property and parse it
View Full Code Here

    while (elements.hasNext()) {
      final JsonNode element = elements.next();

      // parse occur
      final OccurPropertyParser occurParser = new OccurPropertyParser(element, field);
      Modifier mod = null;
      if (occurParser.isPropertyDefined()) {
        mod = occurParser.parse();
      }

      // parse level
View Full Code Here

    while (elements.hasNext()) {
      final JsonNode element = elements.next();

      // parse occur
      final OccurPropertyParser occurParser = new OccurPropertyParser(element, field);
      Modifier mod = null;
      if (occurParser.isPropertyDefined()) {
        mod = occurParser.parse();
      }

      // check if there is either a node or a twig property and parse it
View Full Code Here

  private static BooleanClause.Occur getModifierValue(QueryNode node) {

    if (node instanceof ModifierQueryNode) {
      ModifierQueryNode mNode = ((ModifierQueryNode) node);
      Modifier modifier = mNode.getModifier();

      if (Modifier.MOD_NONE.equals(modifier)) {
        return BooleanClause.Occur.SHOULD;

      } else if (Modifier.MOD_NOT.equals(modifier)) {
View Full Code Here

TOP

Related Classes of org.apache.lucene.queryparser.flexible.core.nodes.ModifierQueryNode.Modifier

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.