# Integration Elastic Search cluster with JAVA

**URL:** <https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822>\
**Category:** Elasticsearch\
**Created:** [July 17, 2013, 10:50am UTC](https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822 "2013-07-17T10:50:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![signin\_vasanth](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@signin\_vasanth](https://discuss.elastic.co/u/signin_vasanth)\
**Post date:** [July 17, 2013, 10:50am UTC](https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822/1 "2013-07-17T10:50:21Z")

</div>

Hi to All,

I have completed the formation of cluster using elasticsearch+river  
jbbc+mysql connector ....Now i have to integrate this cluster to my java  
program to visualize in Java Application..How can i perform this stuff ?  
kindly help me out here ..

As i am new to this elastic search struck down in the above steps.

Thanks in advance

--  
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:** ![Christian\_Th](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Christian\_Th](https://discuss.elastic.co/u/Christian_Th)\
**Post date:** [July 17, 2013, 9:47pm UTC](https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822/2 "2013-07-17T21:47:16Z")

</div>

If you are new to ElasticSearch and you did not know how to integrate ES  
into your java application, i recommend you  
this page [http://www.elasticsearch.org/guide/clients/](http://www.elasticsearch.org/guide/clients/).  
Select a iava integration implementation and look at the applied patterns.  
I like using the Grails and Play! Framework integrations. The Grails  
integration is eventually easier to learn. The good documentation is one  
reason.  
The Play! Framework integration is actually better maintained, i think. I  
prefer it, because it performs better for my tasks.

But this all depends on your needs. Is it a tiny project or do you want to  
index/search 1 TB ?

Beginning from scratch without looking at existing source code can be a  
challenge.

--  
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:** ![Christian\_Th](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Christian\_Th](https://discuss.elastic.co/u/Christian_Th)\
**Post date:** [July 17, 2013, 10:09pm UTC](https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822/3 "2013-07-17T22:09:58Z")

</div>

One addition. the Play! Framework integration could be better for you, as  
source code guide. It is very leightweight and the source code is easier to  
understand.  
The Grails -Es- integration is easier to use, but the source code can be  
tricky.

Only my point of view.

--  
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:** ![Christian\_Th](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Christian\_Th](https://discuss.elastic.co/u/Christian_Th)\
**Post date:** [July 18, 2013, 6:40am UTC](https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822/4 "2013-07-18T06:40:38Z")

</div>

But you can start with something like  
Client client = new TransportClient()  
.addTransportAddress(new  
InetSocketTransportAddress("localhost", 9300));

This test gives you an impression how easy it can be  
[https://github.com/elasticsearch/elasticsearch-mapper-attachments/blob/master/src/test/java/org/elasticsearch/plugin/mapper/attachments/test/SimpleAttachmentIntegrationTests.java](https://github.com/elasticsearch/elasticsearch-mapper-attachments/blob/master/src/test/java/org/elasticsearch/plugin/mapper/attachments/test/SimpleAttachmentIntegrationTests.java)

If you are using the line above with the TransportClient and parts of the  
simpleAttachmentIntegrationTest, you have to replace "node.client()" with  
"client".

Have fun

--  
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:25am UTC](https://discuss.elastic.co/t/integration-elastic-search-cluster-with-java/12822/5 "2017-07-06T02:25:49Z")

</div>


