# Can we add plugin to a TransportClient?

**URL:** <https://discuss.elastic.co/t/can-we-add-plugin-to-a-transportclient/8084>\
**Category:** Elasticsearch\
**Created:** [June 13, 2012, 3:37pm UTC](https://discuss.elastic.co/t/can-we-add-plugin-to-a-transportclient/8084 "2012-06-13T15:37:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 13, 2012, 3:37pm UTC](https://discuss.elastic.co/t/can-we-add-plugin-to-a-transportclient/8084/1 "2012-06-13T15:37:29Z")

</div>

Heya,

I'm playing with the nice elasticsearch-suggest-plugin  
([https://github.com/spinscale/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/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 13, 2012, 5:21pm UTC](https://discuss.elastic.co/t/can-we-add-plugin-to-a-transportclient/8084/2 "2012-06-13T17:21:47Z")

</div>

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](https://github.com/elasticsearch/elasticsearch/issues/1982) for  
more info

--Alexander

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 13, 2012, 6:03pm UTC](https://discuss.elastic.co/t/can-we-add-plugin-to-a-transportclient/8084/3 "2012-06-13T18:03:42Z")

</div>

Excellent ! Thanks.

Cheers  
David

Le 13 juin 2012 à 19:21, Alexander Reelsen [alr@spinscale.de](mailto: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 [TransportClient does not load plugins · Issue #1982 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1982) for more info
> 
> --Alexander

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 3:24am UTC](https://discuss.elastic.co/t/can-we-add-plugin-to-a-transportclient/8084/4 "2017-07-06T03:24:30Z")

</div>


