A very useful hook
relevanssi_hits_filter, which lets you modify the hits directly. The filter passes an array, where index 0 gives the list of hits in the form of an array of post objects and index 1 has the search query as a string, in case you need that information for something.
The filter is very nice, if you want to adjust the search results some how. You can add posts to the results, make sure some posts float on top, remove certain posts… The WPML support Relevanssi has, for example, is based on this filter: results that are not in the correct language are filtered away at this point.
The filter expects you to return an array containing the array of post objects in index 0. The search query is just for information, it doesn’t matter whether you return that or not. So, simply end your filter with
For more information, see more examples in user manual.