Custom Ingest plugin: any way to produce several documents?


(Nikojiro) #1

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?

Best regards,

Nicolas


(David Pilato) #2

You can't do that with ingest indeed.

You can implement a rest endpoint may be which does that ?


(Nikojiro) #3

Yes indeed, this was my initial idea. But the main drawback is that it would need to work in bulk mode as well as on a per document basis. It's probably feasible though, I'll have to look in the code how I could use the same bulk format that the _bulk endpoint accepts.


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.