Feedback on docs

 Hi guys,

      I've recently gotten into Elasticsearch because the old search 

engine at my site

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

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.
To view this discussion on the web visit 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.

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/

      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

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.
To view this discussion on the web visit 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.

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 (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 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.
To view this discussion on the web visit 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.