I am trying to find a clean way to implement the following feature: when indexing a document, produce associated documents and index them, and it should be as transparent as possible.
The "derived" documents would be of an entirely different type. One use case would be to generate contextualized completions or suggestions.
I have some experience with writing custom plugins, especially action plugins, and I was hoping to write a custom plugin to handle this requirement.
I've looked at various resources about ingest plugins, but as far as my understanding goes, an ingest processor can only modify a document structure., and I cannot see any way to produce separate documents.
Any hint on how one might achieve this?