Example usage for org.apache.lucene.queryparser.flexible.core.nodes BoostQueryNode getValue

List of usage examples for org.apache.lucene.queryparser.flexible.core.nodes BoostQueryNode getValue

Introduction

In this page you can find the example usage for org.apache.lucene.queryparser.flexible.core.nodes BoostQueryNode getValue.

Prototype

public float getValue() 

Source Link

Document

Returns the boost value.

Usage

From source file:com.sindicetech.siren.qparser.keyword.builders.BoostQueryNodeBuilder.java

License:Open Source License

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

    if (child == null) {
        return null;
    }// ww w. j  ava2  s.  com

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

    return query;
}