Elasticsearch Java API Tutorial

Is there any working tutorial around that guides people on how to the java api?

The official document is totally useless. Too many assumption were made and not documented.

I am stuck at https://www.elastic.co/guide/en/elasticsearch/client/java-api/2.3/_maven_repository.html step. Maven information there is not usable on eclipse. The eclipse Java project will still throw many exceptions after downloading jar files from http://search.maven.org/#search|ga|1|a%3A"elasticsearch"

Is there a "Hello World" equivalent java application out there that can be used as reference?

what 's you ES version? is your dependency packages are complete and version correct. a simple way to resolve dependencies is to get the packages in $ES_HOME/lib depended.

version is 2.3.4

Does mvn install works from the command line?

Is maven able to download all artifacts of your project?

If so, then you have an issue between maven and eclipse.

If not, may be share your pom.xml file?

the maven artifacts cannot be found on eclipse.

It requires some kind of repository url which I have not idea where to get it.

I cannot find much information on using maven on eclipse.

you may not config you maven project well, this may help http://maven.apache.org/configure.html

Again:

What IDE should I use? Tried eclipse and cannot get it to work. POM.xml download from http://search.maven.org/#search|ga|1|a%3A"elasticsearch".

Is eclipse supported?

Yes.

What is the pom.xml you wrote?

I have no idea what is pom.xml. I dowloaded it from http://search.maven.org/#search|ga|1|a%3A"elasticsearch" and have no idea what to do with it

You can't do anything with that.

If you don't use something like maven or gradle then you will have a lot of manual things to do to be able to use the transport client.

Highly recommended to use maven or gradle.

Is there a place where I can find tutorial on how to use maven. Did google but can't find anything useful

You can't be serious.

https://maven.apache.org/guides/

But please then ask questions you have about Maven on maven mailing list unless it's related to elasticsearch.

Also Gradle is a bit newer (and what we are using at elastic), so may be try instead https://gradle.org/docs#getting-started ?

Eclipse supports Gradle as well AFAIK.

I have concluded my exploration on this.

Conclusion is there are too many things to learn in order to use the elasticsearch Java api. These things contains little or no working documentation. It is too costly and not feasible to use the elasticsearch Java API despite having programmers who know Java.

Alternatively you can download maven
Run mvn dependency:tree
Grab the list of all jars and their versions
Add them manually to eclipse

But this requires a lot of manual work.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.