Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


boostr.in questions - Question:how to sorting data using solr?


Sorting

Solr provides a simple method to sort on one or more indexed fields. Use the "sort' parameter to specify "field direction" pairs, separated by commas if there's more than one sort field:

    q=video&sort=price desc
    q=video&sort=price asc
    q=video&sort=inStock asc, price desc

"score" can also be used as a field name when specifying a sort:

    q=video&sort=score desc
    q=video&sort=inStock asc, score desc

Complex functions may also be used to sort results:

    q=video&sort=div(popularity,add(price,1)) desc

If no sort is specified, the default is score desc to return the matches having the highest relevancy.

asked Sep 13, 2013 in SOLR by rajesh
edited Sep 12, 2013
0 votes
45 views



Related Hot Questions



Government Jobs Opening


...