lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fornoville, Tom" <>
Subject RE: custom scorer in Solr
Date Mon, 14 Jun 2010 08:27:17 GMT
I've been investigating this further and I might have found another path
to consider.

Would it be possible to create a custom implementation of a SortField,
comparable to the RandomSortField, to tackle the problem?

I know it is not your standard question but would really appreciate all
feedback and suggestions on this because this is the issue that will
make or break the acceptance of Solr for this client.


-----Original Message-----
From: Fornoville, Tom 
Sent: woensdag 9 juni 2010 15:35
Subject: custom scorer in Solr

Hi all,


We are currently working on a proof-of-concept for a client using Solr
and have been able to configure all the features they want except the


Problem is that they want scores that make results fall in buckets:

*	Bucket 1: exact match on category (score = 4)
*	Bucket 2: exact match on name (score = 3)
*	Bucket 3: partial match on category (score = 2)
*	Bucket 4: partial match on name (score = 1)


First thing we did was develop a custom similarity class that would
return the correct score depending on the field and an exact or partial


The only problem now is that when a document matches on both the
category and name the scores are added together.

Example: searching for "restaurant" returns documents in the category
restaurant that also have the word restaurant in their name and thus get
a score of 5 (4+1) but they should only get 4.


I assume for this to work we would need to develop a custom Scorer class
but we have no clue on how to incorporate this in Solr.

Maybe there is even a simpler solution that we don't know about.


All suggestions welcome!




View raw message