I think about using FunctionQuery. But as I understand, the
FunctionQuery actually overrides the default similarity function. Am I
right? If I am, this means that I cannot access the similarity value,
which is necessary, because I want it have a major influence on the
final score. I eventually need to calculate the score using a formula
having several arguments. One of them is the default Solr similarity,
i.e. the relevancy of a document for the specific query. Other arguments
are derived from the original document field values.

Thank you.

-----Original Message-----
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 25, 2007 4:42 PM
To: solr-user@lucene.apache.org
Subject: Re: Score customization

Victoria,

Either use FunctionQuery's or hack around HitCollector.collect(int,
float) in SolrIndexSearcher...and adjust the score using the additional
values you mentioned.

Otis
--
Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch

----- Original Message ----
From: Victoria Kaganski <[EMAIL PROTECTED]>
To: solr-user@lucene.apache.org
Sent: Thursday, October 25, 2007 7:19:46 AM
Subject: Score customization


Hi!
My system uses solr to build a searchable archive of documents. I need
to override the default scoring/similarity function because the
additional to the query relevancy factors have to be considered. For
example, each document has "updated on" and "source" fields, which
should influence the score too. I want the score/similarity function be
a sum of weighted (according to configuration) query relevancy, update
level and source rank (calculated at search time). 
Which is the best way to achieve required functionality? Should I
inherit and override existing code or should I build some independent
module (something like requestHandler) and to configure Solr to use it?
 
If I have to override the defaults, which class should it be? In
general, what am I actually trying to customize: scoring or similarity?
Thank you very much.
Victoria 





Reply via email to