Solr does not have a function query value source which is the raw document
relevance score for the current query.
That would be a nice Jira request.
Or, a parameter to outright replace the score for each document rather than
merely multiply or add to it.
-- Jack Krupansky
-----Original Message-----
From: Liu
Sent: Tuesday, August 20, 2013 5:53 AM
To: solr-user@lucene.apache.org
Subject: How to sort by the function:
relevance_score*numberic_field/(relevance_score +numberic_field )
Hi:
I want to rank the search result by the function:
relevance_score*numberic_field/(relevance_score +numberic_field ) , this
function equals to
1/((1/relevance_score)+1/numberic_field)
As far as I know ,I could use function query: sort=
div(1,sum(div(1,field(numberic_field)),div(1,query({!edismax v='
somewords''})))) .There is a subquery in this function: query({!edismax
v='somewords'}) ,it returns the relevance_sore .But I can't figure out its
query efficiency. After tracking the source code, I think the efficiency is
OK, but I can't make sure.
Do we have other approaches to sort docs by:
relevance_score*numberic_field/(relevance_score +numberic_field ) ?
Thank you
Leo