You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Rishabh Bajpai <r_...@lycos.com> on 2003/02/06 07:54:50 UTC

Document.setBoost(float??) |

i mite be missing something, but i didnt find any Document.setBoost(float) {is it float?} either in the javadocs (http://jakarta.apache.org/lucene/docs/api/index.html), 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 factor. 

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?

-rishabh
 
--

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 ;)
>Phil.
>
>----- Original Message -----
>From: "Otis Gospodnetic" <ot...@yahoo.com>
>To: "Lucene Users List" <lu...@jakarta.apache.org>
>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 <mo...@basko.ru> 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: lucene-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>> >
>>
>>
>> __________________________________________________
>> Do you Yahoo!?
>> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
>> http://mailplus.yahoo.com
>>
>> ---------------------------------------------------------------------
>> 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
>
>


_____________________________________________________________
Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus

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


Re: Document.setBoost(float??) |

Posted by Tatu Saloranta <ta...@hypermall.net>.
On Wednesday 05 February 2003 23:54, Rishabh Bajpai wrote:
...
> 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

A guess: this was an something easy to implement and still useful for some 
users (since in many cases some documents can be considered "better", based 
on some feedback or source or type). It doesn't really replace more advanced 
methods of figuring out relevance. So what you are requesting could well 
co-exist with doc boost feature.

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

I don't know if there's any feature that would do exactly that, but if you can 
separate just one or two classes of "more important" words (keywords), you 
could create separate index(es) for those, and boost the search to keyword 
index higher than search for other plain text content.

-+ Tatu +-


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