Tutorial on Java interface to ElasticSearch?


(Alain Désilets) #1

I am a total newbie to ElasticSearch, and I have been using the following
tutorial to get started:

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/getting-started.html

I'm finding it really easy to follow and informative.

Now, I want to use the Java API to write a Java program that uses
ElasticSearch, but I can't find an equally helpful tutorial for the Java
API. I am surfing and searching through the API documentation, but can't
figure out how to do even easy operations like: create an index, put a
document into it, retrieve it, etc...

Of course, I could always write methods that send HTTP requests, at which
point I could rely on what I learned through the above tutorial. But I
would prefer to use a more direct link provided by the Java API.

Does someone know of a good tutorial on the Java API?

Thx.

Alain Désilets

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b0723c1e-8f14-4df2-a80e-a4a4646503a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(David Pilato) #2

Hey Alain,

You can have a look at this: https://github.com/elasticsearchfr/hands-on/tree/answers
http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/index.html

I hope this could help.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 3 juillet 2014 à 16:08:15, Alain Désilets (alaindesilets0@gmail.com) a écrit:

I am a total newbie to ElasticSearch, and I have been using the following tutorial to get started:

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/getting-started.html

I'm finding it really easy to follow and informative.

Now, I want to use the Java API to write a Java program that uses ElasticSearch, but I can't find an equally helpful tutorial for the Java API. I am surfing and searching through the API documentation, but can't figure out how to do even easy operations like: create an index, put a document into it, retrieve it, etc...

Of course, I could always write methods that send HTTP requests, at which point I could rely on what I learned through the above tutorial. But I would prefer to use a more direct link provided by the Java API.

Does someone know of a good tutorial on the Java API?

Thx.

Alain Désilets

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/b0723c1e-8f14-4df2-a80e-a4a4646503a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.53b56447.431bd7b7.cc4%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.


(Ivan Brusic) #3

Currently the best way to learn the Java API is to view the Elasticsearch
search code.

All the REST examples use the Java API underneath, so you can see how the
Java API is used by viewing a REST action such as RestSearchAction,
RestIndexAction, etc...

https://github.com/elasticsearch/elasticsearch/tree/master/src/main/java/org/elasticsearch/rest/action

The unit tests are another great place to see how the Java API is used,
with actual examples:

https://github.com/elasticsearch/elasticsearch/tree/master/src/test/java/org/elasticsearch

Cheers,

Ivan

On Thu, Jul 3, 2014 at 7:08 AM, Alain Désilets alaindesilets0@gmail.com
wrote:

I am a total newbie to ElasticSearch, and I have been using the following
tutorial to get started:

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/getting-started.html

I'm finding it really easy to follow and informative.

Now, I want to use the Java API to write a Java program that uses
ElasticSearch, but I can't find an equally helpful tutorial for the Java
API. I am surfing and searching through the API documentation, but can't
figure out how to do even easy operations like: create an index, put a
document into it, retrieve it, etc...

Of course, I could always write methods that send HTTP requests, at which
point I could rely on what I learned through the above tutorial. But I
would prefer to use a more direct link provided by the Java API.

Does someone know of a good tutorial on the Java API?

Thx.

Alain Désilets

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b0723c1e-8f14-4df2-a80e-a4a4646503a0%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/b0723c1e-8f14-4df2-a80e-a4a4646503a0%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQC7nMYGejLfaNkJCjPLppf-or7axq6G97TKewPH5r%3DZfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(Alain Désilets) #4

Thanks David. This is exactly what I was looking for.

Alain

On Thursday, 3 July 2014 10:10:31 UTC-4, David Pilato wrote:

Hey Alain,

You can have a look at this:
https://github.com/elasticsearchfr/hands-on/tree/answers

http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/index.html

I hope this could help.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr
https://twitter.com/elasticsearchfr

Le 3 juillet 2014 à 16:08:15, Alain Désilets (alainde...@gmail.com
<javascript:>) a écrit:

I am a total newbie to ElasticSearch, and I have been using the following
tutorial to get started:

http://www.elasticsearch.org/guide/en/elasticsearch/guide/current/getting-started.html

I'm finding it really easy to follow and informative.

Now, I want to use the Java API to write a Java program that uses
ElasticSearch, but I can't find an equally helpful tutorial for the Java
API. I am surfing and searching through the API documentation, but can't
figure out how to do even easy operations like: create an index, put a
document into it, retrieve it, etc...

Of course, I could always write methods that send HTTP requests, at which
point I could rely on what I learned through the above tutorial. But I
would prefer to use a more direct link provided by the Java API.

Does someone know of a good tutorial on the Java API?

Thx.

Alain Désilets

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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/b0723c1e-8f14-4df2-a80e-a4a4646503a0%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/b0723c1e-8f14-4df2-a80e-a4a4646503a0%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9732af28-e9a7-4bf5-92e2-7d70bfbad26a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


(Adrian-2) #5

On Thu, Jul 03, 2014 at 09:20:05AM -0700, Ivan Brusic wrote:

Ivan,

Currently the best way to learn the Java API is to view the Elasticsearch
search code.

Or just sift through the generated Java API Documentation. You can find some at: http://javadoc.kyubu.de/elasticsearch.

Best, Adrian

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/20140708222125.GA25315%40server1.850nm.net.
For more options, visit https://groups.google.com/d/optout.


(system) #6