I'm trying to figure out a way to have the default search done by ES to filter out some of the hits after getting back from the core engine, before passing them as a result to the rest caller.
The actual filtering might be done by cross checking some file/config/different DB/etc..., and therefor can't (realistically) be done as part of the original query, only after actually getting the hits.
I found a way I can augment hits, by creating a Plugin that implements
SearchPlugin and provides a
FetchSubPhase that can modify the hits, but I didn't find any way to remove a hit altogether.
Is there a way to accomplish this?