Skip to content
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.

Add support for ES Client Plugins #18

Open
anchialas opened this issue Nov 3, 2016 · 0 comments
Open

Add support for ES Client Plugins #18

anchialas opened this issue Nov 3, 2016 · 0 comments

Comments

@anchialas
Copy link

anchialas commented Nov 3, 2016

Please add support for adding ES Client Plugins (like the org.elasticsearch.index.reindex.ReindexPlugin). Currently it's not possible to configure one or more plugins via EsConfiguration.

As a workaround I've to do something like:

ManagedEsClient prepareEsClient = new ManagedEsClient(configuration.getEsConfiguration());
TransportAddress[] addresses = TransportAddressHelper.fromHostAndPorts(configuration.getEsConfiguration().getServers());
// Rebuild Client with ReindexPlugin (unsupported in ManagedEsClient) 
ManagedEsClient elasticsearchClient = new ManagedEsClient(TransportClient.builder()
              .settings(prepareEsClient.getClient().settings())
              .addPlugin(ReindexPlugin.class)
              .build()
              .addTransportAddresses(addresses));
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant