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:[EMAIL PROTECTED] 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, lets assume that the normal score for Document A is 0.33 (as > calculated by Lucene). What I need is that its true score is 0.33 * (value > of field A) * (value of field B). What is the best way to accomplish this? > Ive 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 (lets assume Movies), > only the higher scoring document is returned. Im 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]