On 18 January 2013 19:18, Gustav <xbihy...@sharklasers.com> wrote: > Hey Gora, thanks for the fast answer! > > I Had tried the rint(score) function before(it would be perfect in my case) > but it didnt work out, i guess it only works with indexed fields, so i got > the "sort param could not be parsed as a query, and is not a field that > exists in the index: rint(score)" error, > > And with the query() function i didnt got any successful result... > > Im stuck in the same cenario as squaro. > > if two docs have score of 1.67989 and 1.6767, I would like to sort them by > price. > > My &sort rules ae something like: > &sort=score desc, price asc
You have to use rint() in combination with query() If I understand your requirements correctly, something along the lines below should work: http://localhost:8983/solr/select/?defType=func&q=rint(query({!v="text:term"}))&fl=score,*&sort=score desc,price asc should work, where one is searching for "term" in the field "text". The score is displayed in the returned fields to demonstrate that it has been rounded off. Regards, Gora