ElasticSearch Java TransportClient: Need to set TransportAddress

Hi Everyone,

In my java code i am able to create a ElasticSearch client as below:
org.elasticsearch.client.Client client = new TransportClient().addTransportAddress(new InetSocketTransportAddress("localhost", 9300));

Now i needed to initialise/setup the transportClient in a Spring Bean instead of in the java-code. But i am not able to add the transport address to the transportclient in the spring-bean.

Any help on how to setup in Spring will be really appreciated.

Thanks,
Karan

Look at the spring Elasticsearch project: https://github.com/dadoonet/spring-elasticsearch

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 27 déc. 2012 à 11:01, karan jaskaran1981@gmail.com a écrit :

Hi Everyone,

In my java code i am able to create a ElasticSearch client as below:
org.elasticsearch.client.Client client = new
TransportClient().addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));

Now i needed to initialise/setup the transportClient in a Spring Bean
instead of in the java-code. But i am not able to add the transport address
to the transportclient in the spring-bean.

Any help on how to setup in Spring will be really appreciated.

Thanks,
Karan

--
View this message in context: http://elasticsearch-users.115913.n3.nabble.com/ElasticSearch-Java-TransportClient-Need-to-set-TransportAddress-tp4027459.html
Sent from the ElasticSearch Users mailing list archive at Nabble.com.

--

--

Hi David ,

Thanks alot. Ill look at the spring based project.

thanks,
Karan