: I have found a user comment at this page : https://issues.apache.org/jira/browse/SOLR-1297 (Enable sorting by function : query) where he has mentioned that there is a workaround "(main query)^0 : func(...)" that can be used to sort results by function without having to : install "SOLR-1297" patch. Could anyone please explain this workaround a bit : in more detail? Maybe someone could give me an example of using it?
what that is in refrence to is that instead of using something like... q=some query ...you would use... q=+(some query) _func_:"aFunction(yourPopularity)" Alternately, you may want to use the "boost" QParser which lets you multiply the scores from a regular query by the output of a function (which is probably more along hte lines of what you want if your popularity ranking produces a number in a bounded range from [0-1] ... q={!boost b=aFunction(yourPopularity) v=$x} & x=some query -Hoss