all documents. But, I would want the sort to be at the system level, I dont'
want the overhead of sorting every query I ever make.

How would 'doing it at the system level' avoid the 'overhead of sorting every query'? Every query has to be sorted, if you want it sorted.

Beyond setting a default sort parameter in general in your request parameters, I don't think there's any way to somehow set defaults "when I ask for sort by score, I REALLY mean sort by score, then by X", which is what I think you asked earlier.

Just send the &sort that you want. "score, some_other_field desc". If that's what you want. The second field will really only be used for identical scores, plus Solr sorts pretty darn efficiently. I'd be pretty surprised if you were able to see any measurable performance difference at all of adding a second field to your sort parameter.

Beware that the design you describe of updating the Solr index on user action can often run into trouble in Solr as you scale. Solr can only handle so many commits in a given short period of time, before it starts having trouble. At least in 1.4.1. I am not sure of the status in 3.1 of some of the "near real time" features meant to ameliorate this problem, at least in some cases. But this is potentially a far bigger performance headache, eventually, then worrying about adding a second field onto your sort effecting performance.

Reply via email to