0

Is possible to sort (order by) a REST search result by RefinementName? Thank you

http://server/_api/search/query?querytext='*'&refiners='Wiki'
1

You can update your search query with sortlist for sort or orderby your results in search + REST API

http://server/_api/search/query?querytext='searchtext'&sortlist='RefinementName:descending'

The query will sort your response based on your RefinementName in descending order.

  • But first I think I should enter the Refiner and then internally order by RefinementName, otherwise the refiner results wold be null. – Ado Aug 30 '16 at 13:33
0

sure you can

check this example out:

https://sharepoint/_api/search/query?querytext='justatest'&refinementfilters='filetype:equals("pptx")&sortlist='filetype:ascending'

EDIT (check updated REST URL too):

Please be sure, that the property, which are as an refinment property is an sortable property, too! Than you can use the "sortlist"

Check this out to configure search: Sorting Not Working in the Search Results Web Part in SharePoint 2013

  • I need the result to be sorted or order by. – Ado Aug 30 '16 at 11:32
  • see updated awnser – domsen123 Sep 1 '16 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.