lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rishabh Bajpai" <>
Subject Document.setBoost(float??) |
Date Thu, 06 Feb 2003 06:54:50 GMT

i mite be missing something, but i didnt find any Document.setBoost(float) {is it float?}
either in the javadocs (, or in the Lucene
source code(lucene-1.2_src) that i looked into....

can anyone tell me how we use this, and what is the implementation? 

what i have understood is that the score calculation associated with a document changes if
we give a boost factor. but i am not clear as to why we want the document score to change
like this; rather each of the field's score within the document should vary? Suppose i am
searching for "i am rishabh"....i want to boost "rishabh" when i am tokenizing this phrase
and indexing it...this would essentially mean that "rishabh" shold have a greater relevancy
than "i" and "am" in each of the documents to which these fields are added? 

so, basically, the question is - should the boost factor of the document not be some function
of all the fields' relevance (that are added to it), rather tahn it just being a simple boost

if i were to crudely interpret it this way, how can i calculate the boost factor that i give
as an argument to this method-even if i have to pass it as a parameter??

i think these are two different things; or am i missing something?


On Mon, 3 Feb 2003 04:06:01   
 Philipp Chudinov wrote:
>thanks. me too... but since the idea with boosting is not documented enough,
>I thought, maybe this magic tool can do it also ;)
>----- Original Message -----
>From: "Otis Gospodnetic" <>
>To: "Lucene Users List" <>
>Sent: Monday, February 03, 2003 3:55 AM
>Subject: Re: document boost
>> That is primary what that setBoost() on a Document instance if for, as
>> far as I know.
>> I don't see how one could use setBoost() on a document at search time
>> :)
>> Otis
>> --- Philipp Chudinov <> wrote:
>> > Hi!
>> > Should I use document.setBoot() only when searching, or I can set it
>> > while
>> > indexing? The idea is that some documents can have higher priority
>> > then
>> > others, so it would be great if I could set boost according to
>> > document
>> > priority when adding document to the index, so it always have more
>> > relevance
>> > then the same with lower priority?
>> >
>> > Phil.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> > For additional commands, e-mail:
>> >
>> __________________________________________________
>> Do you Yahoo!?
>> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> For additional commands, e-mail:
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.

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

View raw message