You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by escher2k <es...@yahoo.com> on 2007/01/03 03:35:20 UTC

Custom scorer...

Is there a way to specify a custom scorer in Solr using the XML configuration
file ? I want to
use the AND operator (e.g. "Lucene AND Solr") to search multiple fields and
then add the
similarity score for each field using a custom similiarity computation for
each.

Thanks.
-- 
View this message in context: http://www.nabble.com/Custom-scorer...-tf2911497.html#a8134966
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Custom scorer...

Posted by Mike Klaas <mi...@gmail.com>.
On 1/4/07, escher2k <es...@yahoo.com> wrote:
>
> Yonik,
>    I have my own Similarity and now need to write my own Scorer for muti
> field scoring.
> Is extending DisMaxQueryScorer the way to go ?

Hmm, have you checked out DisjunctionSumQuery from lucene?  I think it
might be close to what you are looking for.

-Mike

Re: Custom scorer...

Posted by escher2k <es...@yahoo.com>.
Yonik,
   I have my own Similarity and now need to write my own Scorer for muti
field scoring.
Is extending DisMaxQueryScorer the way to go ?

Thanks.


Yonik Seeley wrote:
> 
> On 1/3/07, escher2k <es...@yahoo.com> wrote:
>>    I only saw options to specify the default operator (AND|OR) and to
>> specify similarity. There was nothing for scoring - in case I need to
>> modify
>> the
>> scoring. I got the similarity working by creating my own class.
> 
> If you created your own Similarity implementation, then just specify
> it in the schema.xml.
> If you created your own Scorer, then that's a whole different
> matter... you need to create a custom query handler to use it (start
> with standard or dismax).
> 
> -Yonik
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-scorer...-tf2911497.html#a8172386
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Custom scorer...

Posted by Yonik Seeley <yo...@apache.org>.
On 1/3/07, escher2k <es...@yahoo.com> wrote:
>    I only saw options to specify the default operator (AND|OR) and to
> specify similarity. There was nothing for scoring - in case I need to modify
> the
> scoring. I got the similarity working by creating my own class.

If you created your own Similarity implementation, then just specify
it in the schema.xml.
If you created your own Scorer, then that's a whole different
matter... you need to create a custom query handler to use it (start
with standard or dismax).

-Yonik

Re: Custom scorer...

Posted by escher2k <es...@yahoo.com>.
I haven't written any unfortunately. Right now, I have only implemented 
custom Similarity - in here, I am trying to alter the scoring substantially
depending on the field. However, I might need to alter the overall
document score - I am in the process of investigating if I can get away
without having write custom code beyond tweaking just the Similarity class.


Chris Hostetter wrote:
> 
> 
> : specify similarity. There was nothing for scoring - in case I need to
> modify
> : the
> : scoring. I got the similarity working by creating my own class.
> 
> customer Scorer classes are really only possible via custom Query and
> Weight classes -- which are typically way beyond what most people need to
> modify to achieve their goals.  What kind of Query/Weight/Scorer have you
> written?
> 
> 
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-scorer...-tf2911497.html#a8152165
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Custom scorer...

Posted by Chris Hostetter <ho...@fucit.org>.
: specify similarity. There was nothing for scoring - in case I need to modify
: the
: scoring. I got the similarity working by creating my own class.

customer Scorer classes are really only possible via custom Query and
Weight classes -- which are typically way beyond what most people need to
modify to achieve their goals.  What kind of Query/Weight/Scorer have you
written?





-Hoss


Re: Custom scorer...

Posted by escher2k <es...@yahoo.com>.
Yonik,
   I only saw options to specify the default operator (AND|OR) and to
specify similarity. There was nothing for scoring - in case I need to modify
the
scoring. I got the similarity working by creating my own class.

Thanks.



Yonik Seeley wrote:
> 
> On 1/2/07, escher2k <es...@yahoo.com> wrote:
>> Is there a way to specify a custom scorer in Solr using the XML
>> configuration
>> file ? I want to
>> use the AND operator (e.g. "Lucene AND Solr") to search multiple fields
>> and
>> then add the
>> similarity score for each field using a custom similiarity computation
>> for
>> each.
> 
> Both of these are in the schema... look through the provided example
> schema.xml
> 
> -Yonik
> 
> 

-- 
View this message in context: http://www.nabble.com/Custom-scorer...-tf2911497.html#a8148200
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Custom scorer...

Posted by Yonik Seeley <yo...@apache.org>.
On 1/2/07, escher2k <es...@yahoo.com> wrote:
> Is there a way to specify a custom scorer in Solr using the XML configuration
> file ? I want to
> use the AND operator (e.g. "Lucene AND Solr") to search multiple fields and
> then add the
> similarity score for each field using a custom similiarity computation for
> each.

Both of these are in the schema... look through the provided example schema.xml

-Yonik