Restrict search results to only documents user can see In my application, I have a content type called resource. In the resource content type, I have an entity reference that defines which roles should be able to view that resource. 

When somebody is logged in as a certain role and does a search, he is able to view documents that don't belong to his role. How can I hook to the search results and remove the ones he should not be able to see?

Thanks
I think this module will help you Access by term and don't forget to enable Node access settings in search api settings.