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

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

Introduction

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

Prototype

public QueryNode getChild() 

Source Link

Document

Returns the single child which this node boosts.

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;
    }/*from w  w  w. ja v  a 2  s. c om*/

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

    return query;
}