Try our conversational search powered by Generative AI!

EPiServer Search Sorting


I'm using trying to create a full text search over pages and files simultaneously using the examples found on

Generally it's working as I want but I can't find any examples on how to sort the results in any order other than rank (such as title or published date)

Is this possible?


Oct 14, 2013 5:35

Should be able to attach a filterevent handler to the searchdatasource.filter event. Im not sure if this only filters pages though.

Or you could get the content from the searchdatasource: searchDataSource.Select(new DataSourceSelectArguments()); and then do your custom filtering and bind to a repeater for presentation.


Oct 14, 2013 12:06

Hi Per,

Thanks for your response. I'm using EPiServer 7 MVC and razor and I need the full text searching, filtering and sorting to be done on the server and exposed via web API so I don't think I can use the SearchDataSource web control as it's intended.

Oct 14, 2013 22:14


I would also like to know this! From what I can see there is not parameter for that in the service call (/search/?q={q}&namedindexes={namedindexes}&offset={offset}&limit={limit}&format=xml&accesskey={accesskey}).

But maybe it's possible to add the sorting in the query with a custom IQueryExpression!?

Nov 20, 2013 1:45
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.