Is it possible to build a plugin that can add additional records to a query result before the aggregation of the data happens?
I have data external to the index that identifies additional documents from the index that I would like included. These are documents that do not match the search criteria, but that I know are relevant based on other data/analysis.
So I would like to inject these related documents into the results before the aggregation happens.
The basic idea is to check and external data source, for each matching document if there are related documents and pull them into the result.