Unable to run Java TransportClient for ES 2.2.0

(ted) #1


I am trying to write a very simple TransportClient based application in Java.
But am not able to get it to work.

Here is a stack-overflow question on the same: http://stackoverflow.com/questions/35856832/unable-to-create-transportclient-in-elastic-search

Can someone help me in getting this resolved?

Also, is there some publicly available 'examples' repository for ES where I can look for such issues? Currently, very few such working examples are available on the Internet that use 2.x version of ES and it's very difficult to build a working example by reading just a few lines of code in the documentation.

Thanks !

(David Pilato) #2

Use port 9300

(ted) #3

I tried 9300 and it is slightly faster now but still unable to send any documents to ES.

I have spent a day in this and still not working.

I am thinking of moving to a REST client like Jest. How big of a performance hit do you think it will be?

(David Pilato) #4

I don't think you will notice a big difference.

That being said, I didn't read the full code but you are probably doing something wrong.

It's pretty easy to inject data in elasticsearch.

You will find an example here: https://github.com/dadoonet/legacy-search/blob/02-bulk/src/main/java/fr/pilato/demo/legacysearch/dao/ElasticsearchDao.java

(system) #5