# Feedback on docs

**URL:** <https://discuss.elastic.co/t/feedback-on-docs/15066>\
**Category:** Elasticsearch\
**Created:** [December 31, 2013, 7:54pm UTC](https://discuss.elastic.co/t/feedback-on-docs/15066 "2013-12-31T19:54:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Houle](https://avatars.discourse-cdn.com/v4/letter/p/8e8cbc/32.png) [@Paul\_Houle](https://discuss.elastic.co/u/Paul_Houle)\
**Post date:** [December 31, 2013, 7:54pm UTC](https://discuss.elastic.co/t/feedback-on-docs/15066/1 "2013-12-31T19:54:07Z")

</div>

```
 Hi guys,

      I've recently gotten into Elasticsearch because the old search 

```

engine at my site

[http://ookaboo.com/](http://ookaboo.com/)

```
      is horribly slow and I need something better. I've done a lot of 

```

work with Lucene and Solr in the past and particular I've been involved  
with projects that make very deep changes to those systems because we  
wanted to use them to drive a NER system or do statistical IR with advanced  
topic modeling. This project is nothing like that, it's just a very  
simple search engine that has to be easy to set up, easy to run, and easy  
to scale.

```
      Overall the quality of documentation is great and the amount of 

```

attention that is being paid to the "getting started" process is excellent,  
particularly when compared with Solr, but I have been looking at the docs  
for the java client API and there are some things I could use clarified...

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

The big is one is that there are some cross-cutting patterns in the API I  
don't totally understand. For instance,

- what is the difference between index() and prepareIndex()?
- what is up with the execute(), actionGet() and get() methods of various  
sorts?
- are javadocs available for IndexRequest() and similar objects?

To put this all in context, so far I've had a great experience. Being  
able to just unpack elastic search on my Windows laptop or an AWS instance  
running Linux and start working is a real breath of fresh air!

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/a28c9e02-6d1c-472e-83da-16e1cc19b848%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a28c9e02-6d1c-472e-83da-16e1cc19b848%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Karol\_Gwaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karol_gwaj/32/1324_2.png) [@Karol\_Gwaj](https://discuss.elastic.co/u/Karol_Gwaj)\
**Post date:** [December 31, 2013, 9:50pm UTC](https://discuss.elastic.co/t/feedback-on-docs/15066/2 "2013-12-31T21:50:19Z")

</div>

some of the API methods are interchangeable (more or less) to support  
different coding styles,  
so for example to index document, you can:

- client._prepareIndex_("test", "test").setSource(...)._get_()  
or
- client._prepareIndex_("test", "test").setSource(...)._execute_().  
_actionGet_()  
or
- client._index_(Requests.indexRequest("test").type("test").source(...)).  
_actionGet_()  
and more...

as you can see from example above, _get()_ is doing this same as  
\*execute().actionGet() \*

sadly, elasticsearch internals are not too well documented,  
so your best bet is to drill down through elasticsearch source code and  
find out by yourself

Cheers,

On Tuesday, December 31, 2013 7:54:07 PM UTC, Paul Houle wrote:

> ```
> Hi guys,
> 
> I've recently gotten into Elasticsearch because the old search 
> 
> ```
> 
> engine at my site
> 
> [http://ookaboo.com/](http://ookaboo.com/)
> 
> ```
> is horribly slow and I need something better. I've done a lot 
> 
> ```
> 
> of work with Lucene and Solr in the past and particular I've been involved  
> with projects that make very deep changes to those systems because we  
> wanted to use them to drive a NER system or do statistical IR with advanced  
> topic modeling. This project is nothing like that, it's just a very  
> simple search engine that has to be easy to set up, easy to run, and easy  
> to scale.
> 
> ```
> Overall the quality of documentation is great and the amount of 
> 
> ```
> 
> attention that is being paid to the "getting started" process is excellent,  
> particularly when compared with Solr, but I have been looking at the docs  
> for the java client API and there are some things I could use clarified...
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/client/java-api/current/index.html)
> 
> The big is one is that there are some cross-cutting patterns in the API I  
> don't totally understand. For instance,
> 
> - what is the difference between index() and prepareIndex()?
> - what is up with the execute(), actionGet() and get() methods of various  
> sorts?
> - are javadocs available for IndexRequest() and similar objects?
> 
> To put this all in context, so far I've had a great experience. Being  
> able to just unpack Elasticsearch on my Windows laptop or an AWS instance  
> running Linux and start working is a real breath of fresh air!

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5ed08c13-b770-4806-9f32-e3a3e63494a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5ed08c13-b770-4806-9f32-e3a3e63494a7%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [January 1, 2014, 10:48am UTC](https://discuss.elastic.co/t/feedback-on-docs/15066/3 "2014-01-01T10:48:30Z")

</div>

The differences are

- the prepare() method allow to build immutable request objects. Mutable  
and immutable objects have different characteristics due to performance in  
a multithreaded system design, since immutable objects are free of side  
effects. In Java 8 you can look at the Lambda feature, it comes from  
functional programming, which makes writing correct code much easier. This  
will be the future of Java, and I'm sure that ES API will change in that  
way.

- what you see is the asynchronous API. All ES methods are asynchronously  
executed. There are two styles for each ES method call: one with future  
objects, and one with listeners. So you can receive answers by other  
threads. Both styles coexist for convenience to write better code.

- I have prepared javadocs at  
[http://xbib.org/elasticsearch/1.0.0.Beta2-SNAPSHOT/apidocs/index.html](http://xbib.org/elasticsearch/1.0.0.Beta2-SNAPSHOT/apidocs/index.html) (as  
of November 2013, I can update it if required)

Jörg

On Tue, Dec 31, 2013 at 8:54 PM, Paul Houle [ontology2@gmail.com](mailto:ontology2@gmail.com) wrote:

> The big is one is that there are some cross-cutting patterns in the API I  
> don't totally understand. For instance,
> 
> - what is the difference between index() and prepareIndex()?
> - what is up with the execute(), actionGet() and get() methods of various  
> sorts?
> - are javadocs available for IndexRequest() and similar objects?

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH%3DY8QmMDLXWU%2BcEVC8MoQWiQgSSFgQKH8sUKgG\_KJyDw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoH%3DY8QmMDLXWU%2BcEVC8MoQWiQgSSFgQKH8sUKgG_KJyDw%40mail.gmail.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, 1:58am UTC](https://discuss.elastic.co/t/feedback-on-docs/15066/4 "2017-07-06T01:58:52Z")

</div>


