Package org.apache.lucene.queries

Examples of org.apache.lucene.queries.BoostingQuery


    Element boostQueryElem = DOMUtils.getChildByTagOrFail(e, "BoostQuery");
    float boost = DOMUtils.getAttribute(boostQueryElem, "boost", DEFAULT_BOOST);
    boostQueryElem = DOMUtils.getFirstChildOrFail(boostQueryElem);
    Query boostQuery = factory.getQuery(boostQueryElem);

    BoostingQuery bq = new BoostingQuery(mainQuery, boostQuery, boost);

    bq.setBoost(DOMUtils.getAttribute(e, "boost", 1.0f));
    return bq;

  }
View Full Code Here


        // parsers returned null
        if (positiveQuery == null || negativeQuery == null) {
            return null;
        }

        BoostingQuery boostingQuery = new BoostingQuery(positiveQuery, negativeQuery, negativeBoost);
        if (boost != -1) {
            boostingQuery.setBoost(boost);
        }
        return boostingQuery;
    }
View Full Code Here

TOP

Related Classes of org.apache.lucene.queries.BoostingQuery

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.