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 Brad Kellett <br...@chomp.com> on 2010/08/30 23:04:35 UTC

Custom scoring

Hi all,

I'm looking for examples or pointers to some info on implementing custom scoring in solr/lucene. Basically, what we're looking at doing is to augment the score from a dismax query with some custom signals based on data in fields from the row initially matched. There will be several of these features dynamically scored at query-time (due to the nature of the data, pre-computed stuff isn't really what we're looking for).

I do apologize for the vagueness of this, but a lot of this data is stuff we want to keep under wraps. Essentially, I'm just looking for a place to use some custom java code to be able to manipulate the score for a row matched in a dismax query.

I've been Googling like a mad man, but haven't really hit on something that seems ideal yet. Custom similarity appears to just allow changing the components of the TF-IDF score, for example. Can someone point me to an example of doing something like this?

~Brad

Re: Custom scoring

Posted by Lance Norskog <go...@gmail.com>.
Check out the function query feature, and the bf= parameter. It may be
that the existing functions meet your needs, or that you can add a few
new functions.

It can take a while to understand what you really want to do, so
writing a large piece of code now can be wasteful.

On Mon, Aug 30, 2010 at 2:04 PM, Brad Kellett <br...@chomp.com> wrote:
> Hi all,
>
> I'm looking for examples or pointers to some info on implementing custom scoring in solr/lucene. Basically, what we're looking at doing is to augment the score from a dismax query with some custom signals based on data in fields from the row initially matched. There will be several of these features dynamically scored at query-time (due to the nature of the data, pre-computed stuff isn't really what we're looking for).
>
> I do apologize for the vagueness of this, but a lot of this data is stuff we want to keep under wraps. Essentially, I'm just looking for a place to use some custom java code to be able to manipulate the score for a row matched in a dismax query.
>
> I've been Googling like a mad man, but haven't really hit on something that seems ideal yet. Custom similarity appears to just allow changing the components of the TF-IDF score, for example. Can someone point me to an example of doing something like this?
>
> ~Brad



-- 
Lance Norskog
goksron@gmail.com