• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java AndQueryNode类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.apache.lucene.queryparser.flexible.core.nodes.AndQueryNode的典型用法代码示例。如果您正苦于以下问题:Java AndQueryNode类的具体用法?Java AndQueryNode怎么用?Java AndQueryNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

AndQueryNode类属于org.apache.lucene.queryparser.flexible.core.nodes包,在下文中一共展示了AndQueryNode类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ConjQuery

点赞 3

import org.apache.lucene.queryparser.flexible.core.nodes.AndQueryNode; //导入依赖的package包/类
final public QueryNode ConjQuery(CharSequence field) throws ParseException {
QueryNode first, c;
Vector<QueryNode> clauses = null;
  first = ModClause(field);
  label_3:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case AND:
      ;
      break;
    default:
      jj_la1[6] = jj_gen;
      break label_3;
    }
    jj_consume_token(AND);
    c = ModClause(field);
   if (clauses == null) {
       clauses = new Vector<>();
       clauses.addElement(first);
   }
   clauses.addElement(c);
  }
  if (clauses != null) {
    {if (true) return new AndQueryNode(clauses);}
  } else {
      {if (true) return first;}
  }
  throw new Error("Missing return statement in function");
}
 

开发者ID:lamsfoundation,
项目名称:lams,
代码行数:30,
代码来源:StandardSyntaxParser.java

示例2: preProcessNode

点赞 3

import org.apache.lucene.queryparser.flexible.core.nodes.AndQueryNode; //导入依赖的package包/类
protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {
  QueryNode parent = node.getParent();
  if (node instanceof BooleanQueryNode) {
    if (parent instanceof BooleanQueryNode) {
      node.setTag(TAG_REMOVE, Boolean.TRUE); // no precedence
    } else {
      node.setTag(TAG_BOOLEAN_ROOT, Boolean.TRUE);
    }
  } else if (parent instanceof BooleanQueryNode) {
    if ((parent instanceof AndQueryNode)
        || (usingAnd && isDefaultBooleanQueryNode(parent))) {
      tagModifierButDoNotOverride(node, ModifierQueryNode.Modifier.MOD_REQ);
    }
  }
  return node;
}
 

开发者ID:lamsfoundation,
项目名称:lams,
代码行数:17,
代码来源:BooleanQuery2ModifierNodeProcessor.java

示例3: preProcessNode

点赞 2

import org.apache.lucene.queryparser.flexible.core.nodes.AndQueryNode; //导入依赖的package包/类
@Override
protected QueryNode preProcessNode(QueryNode node) throws QueryNodeException {

  if (!((node instanceof BooleanQueryNode && !(node instanceof AndQueryNode)) || node
      .getClass() == FieldQueryNode.class)) {
    throw new QueryNodeException(new MessageImpl(
        QueryParserMessages.NODE_ACTION_NOT_SUPPORTED));
  }

  return node;

}
 

开发者ID:europeana,
项目名称:search,
代码行数:13,
代码来源:SpansValidatorQueryNodeProcessor.java

示例4: ConjQuery

点赞 2

import org.apache.lucene.queryparser.flexible.core.nodes.AndQueryNode; //导入依赖的package包/类
final public QueryNode ConjQuery(CharSequence field) throws ParseException {
QueryNode first, c;
Vector<QueryNode> clauses = null;
  first = ModClause(field);
  label_3:
  while (true) {
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case AND:
      ;
      break;
    default:
      jj_la1[6] = jj_gen;
      break label_3;
    }
    jj_consume_token(AND);
    c = ModClause(field);
   if (clauses == null) {
       clauses = new Vector<QueryNode>();
       clauses.addElement(first);
   }
   clauses.addElement(c);
  }
  if (clauses != null) {
    {if (true) return new AndQueryNode(clauses);}
  } else {
      {if (true) return first;}
  }
  throw new Error("Missing return statement in function");
}
 

开发者ID:pkarmstr,
项目名称:NYBC,
代码行数:30,
代码来源:StandardSyntaxParser.java

示例5: processNode

点赞 2

import org.apache.lucene.queryparser.flexible.core.nodes.AndQueryNode; //导入依赖的package包/类
private void processNode(QueryNode node) {

    if (node instanceof AndQueryNode || node instanceof OrQueryNode) {

      if (!this.latestNodeVerified && !this.queryNodeList.isEmpty()) {
        this.queryNodeList.add(applyModifier(this.queryNodeList
            .remove(this.queryNodeList.size() - 1), node));
        this.latestNodeVerified = true;

      }

    } else if (!(node instanceof BooleanQueryNode)) {
      this.queryNodeList.add(applyModifier(node, node.getParent()));
      this.latestNodeVerified = false;

    }

  }
 

开发者ID:lamsfoundation,
项目名称:lams,
代码行数:19,
代码来源:GroupQueryNodeProcessor.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)