Sorting Search Results

Topics: Customizing Orchard
Sep 23, 2015 at 3:27 PM
Hi,

Working on creating a custom search results page, and would like the results sorted by the Items.ContentItem.ContentType. I'm not sure the best way of doing this. It appears there is no settings on what to sort.

Using Lucene, Indexing, and Search
Coordinator
Sep 23, 2015 at 5:08 PM
You will need to copy the search controller in your own module and customize the code.

I would however suggest you add a filter for content types instead of a sort order. This would collide with relevance sorting, which is usually more useful for search. Or do you have another scenario? It's like you are trying to do grouping instead, which might require more than just ordering.