lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gonçalo Gaiolas <goncalo.gaio...@outsystems.com>
Subject RE: Scoring based on fields and categorization
Date Tue, 05 Sep 2006 12:32:36 GMT
Hi Karl,

Thanks for the super quick response!

One question - should this boosting occur during index time or at query
time? I'm a bit confused as to where should I apply this boost in order to
affect the results of a search query.

Once again thanks a lot!

Gonçalo

-----Original Message-----
From: karl wettin [mailto:karl.wettin@gmail.com] 
Sent: terça-feira, 5 de Setembro de 2006 13:10
To: java-user@lucene.apache.org
Subject: Re: Scoring based on fields and categorization

On Tue, 2006-09-05 at 11:54 +0100, Gonçalo Gaiolas wrote:
> -          Scoring should take in consideration not only the relevance of
> the contents, but also two numerical values in other document fields. For
> example, let’s assume that the normal score for Document A is 0.33 (as
> calculated by Lucene). What I need is that it’s true score is 0.33 *
(value
> of field A) * (value of field B). What is the best way to accomplish this?
> I’ve read that changing the scoring algorithm is difficult and painful. 

Indeed you want to stay off the scoring algorithm if you can. It is
probably much eaiser for you to just boost the document based on the
values you have: 

http://lucene.apache.org/java/docs/api/org/apache/lucene/document/Document.h
tml#setBoost(float)


> -          I need to make sure only one document per Category is
retrieved.
> Categories are also implemented as index fields. So, for example, if my
> search yields two documents with the same Category (let’s assume Movies),
> only the higher scoring document is returned. I’m assuming the easiest way
> to implement this is post-processing the fetching process, maybe with a
> HitCollector?

Yes, in most cases that would be the way to go.


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



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


Mime
View raw message