Hi,

  I have a custom function query (value source) where I want to use the
score for some computation. For example, for every document I want to add
some number (obtained from an external file) to its score. I am achieving
this like the following:

http://localhost:PORT/myCore/select?q=queryString&qt=my_request_handler&fl=field1,field2,score&debugQuery=on&sort=myfunc(query$(qq))
desc

Where, definition of "my_request_handler" & "qq" are as follows:

<requestHandler name="my_request_handler" class="solr.SearchHandler">
        <lst name="defaults">
            <str name="qq">{!dismax v=$q}</str>
            
            <str name="qf">
                field1^2 field^3
            </str>
</requestHandler>

Questions:

1. To obtain the score in my function query I am executing the dismax query
again ( myfunc( query($qq)). Could it slow things down? Is there any way I
can access the score without querying again?
2. I also want to normalize the (query) score I get to a range between 0 -
1. Is there any way to access the MAX_SCORE in the same function query/Value
source (so that I can divide every score by that)?


Thanks lot guys

Sid




--
View this message in context: 
http://lucene.472066.n3.nabble.com/Access-Score-in-Custom-Function-Query-tp3478597p3478597.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to