I use a View to show search results (core Search module). In the view I have grouped the grid on the field "Content type". This works fine, each content type is shown under it's own title.
But under "Sort" in the View I can only sort the content types by ASC or DESC. But I would like to use a custom sort order like "node type = product", followed by "node type = accessories" and so on.
How to do that? I have tried using hook_views_query_alter() and hook_search_api_query_alter() and a few other tings, with no luck.