lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George <>
Subject Custom sort (score + custom value)
Date Sun, 02 Nov 2008 09:09:49 GMT

I want to implement a custom sort in Solr based on a combination of
relevance (Solr gives me it yet => score) and a custom value I've calculated
previously for each document. I see two options:

1. Use a function query (I'm using a DisMaxRequestHandler).
2. Create a component that set SortSpec with a sort that has a custom
ComparatorSource (similar to QueryElevationComponent).

The first option has the problem: While the relevance value changes for
every query, my custom value is constant for each doc. It implies queries
with documents that have high relevance are less affected with my custom
value. On the other hand, queries with low relevance are affected a lot with
my custom value. Can it be proportional with a function query? (i.e. docs
with low relevance are less affected by my custom value).

The second option has the problem: Solr score isn't normalized. I need it
normalized in order to apply my custom value in the sortValue function in

What do you think? What's the best option in that case? Another option?

Thank you in advance,


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message