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

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


  public BoostQueryNodeBuilder() {
    // empty constructor
  }

  public Query build(final QueryNode queryNode) throws QueryNodeException {
    final BoostQueryNode boostNode = (BoostQueryNode) queryNode;
    final QueryNode child = boostNode.getChild();

    if (child == null) {
      return null;
    }

    final Query query = (Query) child
        .getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
    query.setBoost(boostNode.getValue());

    return query;
  }
View Full Code Here


      float f = (float)1.0;
      try {
        f = Float.valueOf(boost.image).floatValue();
        // avoid boosting null queries, such as those caused by stop words
          if (q != null) {
            q = new BoostQueryNode(q, f);
          }
      } catch (Exception ignored) {
        /* Should this be handled somehow? (defaults to "no boost", if
             * boost number is invalid)
             */
 
View Full Code Here

      float f = (float)1.0;
      try {
        f = Float.valueOf(boost.image).floatValue();
        // avoid boosting null queries, such as those caused by stop words
          if (q != null) {
            q = new BoostQueryNode(q, f);
          }
      } catch (Exception ignored) {
        /* Should this be handled somehow? (defaults to "no boost", if
           * boost number is invalid)
           */
 
View Full Code Here

      float f = (float)1.0;
      try {
        f = Float.valueOf(boost.image).floatValue();
        // avoid boosting null queries, such as those caused by stop words
          if (q != null) {
            q = new BoostQueryNode(q, f);
          }
      } catch (Exception ignored) {
        /* Should this be handled somehow? (defaults to "no boost", if
             * boost number is invalid)
             */
 
View Full Code Here

      float f = (float)1.0;
      try {
        f = Float.valueOf(boost.image).floatValue();
        // avoid boosting null queries, such as those caused by stop words
          if (q != null) {
            q = new BoostQueryNode(q, f);
          }
      } catch (Exception ignored) {
        /* Should this be handled somehow? (defaults to "no boost", if
           * boost number is invalid)
           */
 
View Full Code Here

    // empty constructor
  }

  @Override
  public Query build(QueryNode queryNode) throws QueryNodeException {
    BoostQueryNode boostNode = (BoostQueryNode) queryNode;
    QueryNode child = boostNode.getChild();

    if (child == null) {
      return null;
    }

    Query query = (Query) child
        .getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
    query.setBoost(boostNode.getValue());

    return query;

  }
View Full Code Here

        if (fieldConfig != null) {
          Float boost = fieldConfig.get(ConfigurationKeys.BOOST);

          if (boost != null) {
            return new BoostQueryNode(node, boost);
          }

        }

      }
View Full Code Here

      float f = (float)1.0;
      try {
        f = Float.valueOf(boost.image).floatValue();
        // avoid boosting null queries, such as those caused by stop words
          if (q != null) {
            q = new BoostQueryNode(q, f);
          }
      } catch (Exception ignored) {
        /* Should this be handled somehow? (defaults to "no boost", if
             * boost number is invalid)
             */
 
View Full Code Here

      float f = (float)1.0;
      try {
        f = Float.valueOf(boost.image).floatValue();
        // avoid boosting null queries, such as those caused by stop words
          if (q != null) {
            q = new BoostQueryNode(q, f);
          }
      } catch (Exception ignored) {
        /* Should this be handled somehow? (defaults to "no boost", if
           * boost number is invalid)
           */
 
View Full Code Here

TOP

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

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.