Can we add plugin to a TransportClient?


(David Pilato) #1

Heya,

I'm playing with the nice elasticsearch-suggest-plugin
(https://github.com/spinscale/elasticsearch-suggest-plugin) from Alexander
Reelsen.

When adding the plugin to my ES Node, everything is perfect. I can easily curl
the suggester plugin.

But, in Java, I connect to my node using a TransportClient.
Sending a SuggestRequest in Java to the node through the transport client failed
with a NullPointerException at InternalTransportClient line 100.

java.lang.NullPointerException

at
org.elasticsearch.client.transport.support.InternalTransportClient$2.doWithNode(InternalTransportClient.java:100)

at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:214)

at
org.elasticsearch.client.transport.support.InternalTransportClient.execute(InternalTransportClient.java:97)

at
org.elasticsearch.client.transport.TransportClient.execute(TransportClient.java:275)

at
org.elasticsearch.client.action.suggest.SuggestRequestBuilder.doExecute(SuggestRequestBuilder.java:19)

at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:53)

at
org.elasticsearch.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:47)

at
fr.gouv.finances.douane.banaco.dao.recherche.RechercheElasticDAOImpl.fieldsAutoCompletion(RechercheElasticDAOImpl.java:394)

In debug mode, I can see that the problem is that the action "suggest" is not
registered in the list of available actions for the transport client.

So, my questions are :

  • Can I do something on my side (settings) or Is it impossible for a plugin to
    be used outside a regular client (given by a node) ?
  • If I can register the plugin to add this suggest feature, how can I do it ?
  • Is it possible to add it after the creation of the Transport Client ?
  • Would it be nice that the Transport Client autodiscover some plugins like the
    Node does ? -> If so, I will raise a feature request.

Thanks for your advice

--
David Pilato
http://dev.david.pilato.fr/
Twitter : @dadoonet


(Alexander Reelsen) #2

Hi

I had the same problem some days, and Shay immediately fixed the issue...
will be fixed with the next release on elasticsearch.

Check out https://github.com/elasticsearch/elasticsearch/issues/1982 for
more info

--Alexander


(David Pilato) #3

Excellent ! Thanks.

Cheers
David

Le 13 juin 2012 à 19:21, Alexander Reelsen alr@spinscale.de a écrit :

Hi

I had the same problem some days, and Shay immediately fixed the issue... will be fixed with the next release on elasticsearch.

Check out https://github.com/elasticsearch/elasticsearch/issues/1982 for more info

--Alexander


(system) #4