Instantiating elasticsearch processors in custom processor

Hi! I'm hoping to run language inference over a number of fields as documented in this blog: Multilingual search using language identification in Elasticsearch | Elastic Blog

Because I want to run it over a number of fields, I'm hoping I can centralise this logic, rather than having ~6 processors for each field. I was hoping I could put the processors for this logic in a pipeline and then call that pipeline with the pipeline processor and pass in a parameter however this isn't possible.

My new port of call is to create a custom processor in a plugin and instantiate the processors I want in the custom processor, chaining the execute statements. I can't seem to instantiate these though. Am I missing a trick - is this possible or is there a better way to do this?


Just curious -- do you see performance problems when you put all 6 processors explicitly into your pipeline? Or is your goal a simpler pipeline definition?

Simpler pipeline definition - feels like a code smell to have the same 5 processors repeated for each field I want to run language inference on

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