Examples of BoostingQuery


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

Examples of org.apache.lucene.queries.BoostingQuery

        // 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

Examples of org.apache.lucene.search.BoostingQuery

        }
        if (negativeBoost == -1) {
            throw new QueryParsingException(parseContext.index(), "[boosting] query requires 'negative_boost' to be set'");
        }

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

Examples of org.apache.lucene.search.BoostingQuery

    {
      throw new ParserException("BoostingQuery \"BoostQuery\" element missing a child element");
    }
    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

Examples of org.apache.lucene.search.BoostingQuery

     Element boostQueryElem=DOMUtils.getChildByTagOrFail(e,"BoostQuery");
      float boost=DOMUtils.getAttribute(boostQueryElem,"boost",defaultBoost);
     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

Examples of org.apache.lucene.search.BoostingQuery

     Element boostQueryElem=DOMUtils.getChildByTagOrFail(e,"BoostQuery");
      float boost=DOMUtils.getAttribute(boostQueryElem,"boost",defaultBoost);
     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

Examples of org.apache.lucene.search.BoostingQuery

     Element boostQueryElem=DOMUtils.getChildByTagOrFail(e,"BoostQuery");
      float boost=DOMUtils.getAttribute(boostQueryElem,"boost",defaultBoost);
     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
TOP
Copyright © 2018 www.massapi.com. 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.