lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dror Matalon <d...@zapatec.com>
Subject Re: field boosting best practise
Date Tue, 16 Dec 2003 18:15:43 GMT
Also, as has been mentioned before, you might not need to
boost the title. Since titles tend to be shorter than the actual
document terms in the title are given more weight than terms in the
document.

Dror

On Tue, Dec 16, 2003 at 10:03:20AM -0800, Doug Cutting wrote:
> If you wish to boost the title field for every query then it would be 
> easiest to boost the title clause of your query, with Query.setBoost(). 
>  Field.setBoost() should only be used when you want to give a field 
> different boosts in different documents, but since you want to boost all 
> titles by the same amount, you'll find it easier to boost at query time. 
>  That way you can experiment with the boost amount without re-building 
> the index.  The values of Field.setBoost() are built into the index and 
> are harder to change.  Thus I recommend using Query.setBoost() instead. 
>  Construct a query for each field to be searched (by hand, or with the 
> QueryParser), boost each of these field queries separately, then build a 
> BooleanQuery that combines these into a single Query that you then 
> execute.  I hope that makes sense.
> 
> Doug
> 
> Maurice Coyle wrote:
> >hi,
> >i was wondering what's the best approach to take when boosting the value of
> >a particular field.
> >
> >i'm searching over a document's title, url and contents fields and i want 
> >to
> >try giving certain fields a boost at times to see if it improves my 
> >results.
> >so for instance if i want to give the title field more weight i can use
> >Field.setBoost() to do this.
> >
> >my question is, say for example i want to give the title field twice as 
> >much
> >weight as the url and contents fields.  do i set the boost value of title 
> >to
> >be 2.0 or should i set the boost value of the url and contents fields to be
> >0.25 and the boost value of the title field to be 0.5 (thereby having all
> >boost values adding up to 1 so all the socres are normalised with respect 
> >to
> >the title field's boost).
> >
> >i just find the messages in the archives a little confusing regarding this,
> >i can't see which approach is best, or if either is best.
> >
> >any help appreciated.
> >maurice
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 

-- 
Dror Matalon
Zapatec Inc 
1700 MLK Way
Berkeley, CA 94709
http://www.fastbuzz.com
http://www.zapatec.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message