I know there are some other threads regarding this but so far I haven't found an answer in them to my particular problem.
The problem is that in this site, the administrators add roles liberally and assign permissions to documents as they see fit, i.e. not always on a root level. We have catered for this on the listings by trimming them using the properties and methods in the CmsContentBase object; but we can't do this with search results, as you know.
So, we do want to go the route of parsing the search results to make sure the current user has access to each of them but I haven't found an efficient way to do it. I already understand performance may be severely compromised but what I intend to do is have a public-only index for anonymous users and a full index for authenticated users and only apply the filtering to those results.
Option B is to index permissions as well but I think that would be very complex. I have read the documentation, tutorials and posts on making custom indexers and I guess that would be the way to go about this but haven't fully understood what's involved.
I guess what I'm asking for here is for some code examples on the most efficient way to check permissions based on the data available in the ResultItem object.