PutComposableIndexTemplateRequest in Custom Plugin

Hello! I have been working on a custom Elasticsearch plugin that should create an index template and its components when an Elasticsearch instance loads this plugin.

The only client that I can access is NodeClient and there is no way to create PutComposableIndexTemplateRequest as it is not available in the below dependency. (Maven)


I can create an index template with client.admin().indices().putTemplate(...); method but there is no way to use the ComposableIndexTemplate class with this client. If I need to add a dependency like RestHighLevelClient, then I must set the host and port parameters to connect the cluster with this client even though this plugin is already running in an Elasticsearch cluster. It seems weird for the custom plugins, from my point of view.

Should I add this high-level client as a dependency and define host/port parameters? Or is there another way to add components to the ES instance?

Thanks in advance :slightly_smiling_face:

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