# Transport Mode using Groovy API

**URL:** <https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453>\
**Category:** Elasticsearch\
**Created:** [June 18, 2013, 7:21am UTC](https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453 "2013-06-18T07:21:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manoj\_Mohan\_2](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@Manoj\_Mohan\_2](https://discuss.elastic.co/u/Manoj_Mohan_2)\
**Post date:** [June 18, 2013, 7:21am UTC](https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453/1 "2013-06-18T07:21:18Z")

</div>

Hello everybody,

I am using Elasticsearch in my application to index large amounts of data.  
Now I am shifting to the groovy api from a JEST client. The thing I  
understand is that since my server is running on a different instance, I  
need to use the "Transport" mode.  
When I checked that out it felt I was losing out on a lot of groovy  
easiness like the ability to use closures and have to use the standard java  
style SearchRequestBuilder.

I wanted to know how I would use TransportClient and achieve the same level  
of Groovy base possible with maybe a GNode or Is there something else that  
I am missing.

Any help would be greatly appreciated.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 24, 2013, 1:32pm UTC](https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453/2 "2013-06-24T13:32:11Z")

</div>

Hey,

you create a TransportClient and wrap it into a GClient. From then on you  
should be good to go...  
Hope this helps...

--Alex

On Tue, Jun 18, 2013 at 9:21 AM, Manoj Mohan [manoj@intelligrape.com](mailto:manoj@intelligrape.com) wrote:

> Hello everybody,
> 
> I am using Elasticsearch in my application to index large amounts of data.  
> Now I am shifting to the groovy api from a JEST client. The thing I  
> understand is that since my server is running on a different instance, I  
> need to use the "Transport" mode.  
> When I checked that out it felt I was losing out on a lot of groovy  
> easiness like the ability to use closures and have to use the standard java  
> style SearchRequestBuilder.
> 
> I wanted to know how I would use TransportClient and achieve the same  
> level of Groovy base possible with maybe a GNode or Is there something  
> else that I am missing.
> 
> Any help would be greatly appreciated.
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Manoj\_Mohan\_2](https://avatars.discourse-cdn.com/v4/letter/m/e9a140/32.png) [@Manoj\_Mohan\_2](https://discuss.elastic.co/u/Manoj_Mohan_2)\
**Post date:** [June 26, 2013, 7:45am UTC](https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453/3 "2013-06-26T07:45:54Z")

</div>

Thanks Alexander ... finally worked it out...

I am now getting a "No Node available" exception and can't seem to work  
around it. Any ideas on how to tackle it ... ?  
Here's how I set up the transport client

TransportClient transportClient = new TransportClient(settingsBuilder())  
transportClient.addTransportAddress(new InetSocketTransportAddress(, 9300)  
client = new GClient(transportClient)

private def settingsBuilder() {  
def transportSettings = ImmutableSettings.settingsBuilder()  
transportSettings.put("client.transport.ping\_timeout", "60")  
transportSettings.put("client.transport.ignore\_cluster\_name", true)  
// Use the "sniff" feature of transport client ?  
transportSettings.put("client.transport.sniff", true)  
return transportSettings  
}

Any help would be greatly appreciated.

Regards  
Manoj Mohan  
Intelligrape Software

On Mon, Jun 24, 2013 at 7:02 PM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de) wrote:

> Hey,
> 
> you create a TransportClient and wrap it into a GClient. From then on you  
> should be good to go...  
> Hope this helps...
> 
> --Alex
> 
> On Tue, Jun 18, 2013 at 9:21 AM, Manoj Mohan [manoj@intelligrape.com](mailto:manoj@intelligrape.com)wrote:
> 
> > Hello everybody,
> > 
> > I am using Elasticsearch in my application to index large amounts of  
> > data. Now I am shifting to the groovy api from a JEST client. The thing I  
> > understand is that since my server is running on a different instance, I  
> > need to use the "Transport" mode.  
> > When I checked that out it felt I was losing out on a lot of groovy  
> > easiness like the ability to use closures and have to use the standard java  
> > style SearchRequestBuilder.
> > 
> > I wanted to know how I would use TransportClient and achieve the same  
> > level of Groovy base possible with maybe a GNode or Is there something  
> > else that I am missing.
> > 
> > Any help would be greatly appreciated.
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/5Jt7xOMCqpg/unsubscribe](https://groups.google.com/d/topic/elasticsearch/5Jt7xOMCqpg/unsubscribe).  
> To unsubscribe from this group and all its topics, send an email to  
> [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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 26, 2013, 1:33pm UTC](https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453/4 "2013-06-26T13:33:34Z")

</div>

Hey,

can you try specifying a cluster name instead of ignoring the cluster name  
(just for debugging purposes to make sure if it works). Are there any more  
logs you could provide, apart from that?

--Alex

On Wed, Jun 26, 2013 at 9:45 AM, Manoj Mohan [manoj@intelligrape.com](mailto:manoj@intelligrape.com) wrote:

> Thanks Alexander ... finally worked it out...
> 
> I am now getting a "No Node available" exception and can't seem to work  
> around it. Any ideas on how to tackle it ... ?  
> Here's how I set up the transport client
> 
> TransportClient transportClient = new TransportClient(settingsBuilder())  
> transportClient.addTransportAddress(new InetSocketTransportAddress(, 9300)  
> client = new GClient(transportClient)
> 
> private def settingsBuilder() {  
> def transportSettings = ImmutableSettings.settingsBuilder()  
> transportSettings.put("client.transport.ping\_timeout", "60")  
> transportSettings.put("client.transport.ignore\_cluster\_name", true)  
> // Use the "sniff" feature of transport client ?  
> transportSettings.put("client.transport.sniff", true)  
> return transportSettings  
> }
> 
> Any help would be greatly appreciated.
> 
> Regards  
> Manoj Mohan  
> Intelligrape Software
> 
> On Mon, Jun 24, 2013 at 7:02 PM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)wrote:
> 
> > Hey,
> > 
> > you create a TransportClient and wrap it into a GClient. From then on you  
> > should be good to go...  
> > Hope this helps...
> > 
> > --Alex
> > 
> > On Tue, Jun 18, 2013 at 9:21 AM, Manoj Mohan [manoj@intelligrape.com](mailto:manoj@intelligrape.com)wrote:
> > 
> > > Hello everybody,
> > > 
> > > I am using Elasticsearch in my application to index large amounts of  
> > > data. Now I am shifting to the groovy api from a JEST client. The thing I  
> > > understand is that since my server is running on a different instance, I  
> > > need to use the "Transport" mode.  
> > > When I checked that out it felt I was losing out on a lot of groovy  
> > > easiness like the ability to use closures and have to use the standard java  
> > > style SearchRequestBuilder.
> > > 
> > > I wanted to know how I would use TransportClient and achieve the same  
> > > level of Groovy base possible with maybe a GNode or Is there something  
> > > else that I am missing.
> > > 
> > > Any help would be greatly appreciated.
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google  
> > > Groups "elasticsearch" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send  
> > > an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > > 
> > > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/5Jt7xOMCqpg/unsubscribe](https://groups.google.com/d/topic/elasticsearch/5Jt7xOMCqpg/unsubscribe).  
> > To unsubscribe from this group and all its topics, send an email to  
> > [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).
> > 
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:29am UTC](https://discuss.elastic.co/t/transport-mode-using-groovy-api/12453/5 "2017-07-06T02:29:22Z")

</div>


