Reputation: 341
We have an requirement where we have to use the delete by query plugin. As per new ES version 2.x the delete by query is used as an plugin through Transport client as shown below: private TransportClient dc1Client = null;
this.dc1Client=TransportClient.builder().settings(settings).addPlugin(DeleteByQueryPlugin.class).build();
We have been using same transport client for indexing and searching. But adding the delete plugin will make it heavy while performing search and index operations.
Can we have more than one Transport client in an application??
one transport client for indexing and searching and another transport client for using delete by query plugin
Upvotes: 1
Views: 204
Reputation: 14512
You should use only one single instance of the plugin. It's threadsafe so I don't see what would be the added value of having 2 instances.
Note that Delete by query will change a bit in the next versions as elasticsearch will have a Task Management API for long running tasks.
Also, what kind of delete operations are you running?
Upvotes: 1