lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Boosting groups
Date Wed, 31 Mar 2004 14:36:27 GMT
On Mar 31, 2004, at 9:16 AM, Grant Ingersoll wrote:
> Hi,
> I was wondering if boosting a grouping of terms has any meaning?
> For example, (A^2  OR B^3 OR C^1.5)^5.0

If this is the entire query, boosting the entire group really doesn't 
do anything useful.  Every score will be boosted equally by 5.0, so you 
may as well not even use a boost on the group.

> I didn't see it in the query syntax documentation (but the query 
> parser seems to accept it).  If it is meaningful, what are the 
> semantics of it?  Is the boost factor distributive?  That is, is the 
> above query equivalent to (A^10.0 OR B^15.0 OR C^7.5) ?

Yes, its multiplied like you have shown.  From BooleanQuery:

         if (getBoost() != 1.0f) {                 // incorporate boost
           if (query == c.query)                   // if rewrite was 
             query = (Query)query.clone();         // then clone before 
           query.setBoost(getBoost() * query.getBoost());

That is part of the rewrite method.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message