Raimon, If you use the edismax query parser (defType=edismax), you can set to functions the url parameters 'bf' and 'boost' to add to or multiply by the score attribute (if I remember correctly, the addition occurs first).
Since one will always occur first, you may have to do a bit of algrebra/refactoring of your desired function, but it may be possible to express what you want to express, or something similar at least (I'm not completely sure whether this mechanism is as expressive as putting the 'score' field in the function -- even if they are equally expressive, I agree that it would be nice to put 'score' in the function, for increase succinct-ness). Hope this helps, mwatts From: Raimon Bosch [mailto:[email protected]] Sent: Sunday, December 11, 2011 1:56 PM To: [email protected] Subject: include score in sort function Hi, I was testing the sorting by function query https://issues.apache.org/jira/browse/SOLR-1297 and I was trying something like: http://localhost:8084/solr35/myapp/select/?wt=xml&start=0&rows=13&q.alt=my+query&sort=sum(mul(score,3),mul(num_visits,2))%20desc In this way we will be able to add little modifications to our score formula by giving weight to other numeric fields. The problem is that the score is not considered as a field inside the sorting function and it only works with numeric fields already in your index i.e sort=sum(mul(num_points,3),mul(num_visits,2))%20desc There is another way to include original score on this sort function?
