My 2 cents: I vastly prefer the Java API. Much better performance than
REST, much better control over the many features, and while there is a lot
of code to write (yes, this is a benefit to me, as I love to write code)
there is also a lot more gained insight and learning. The Java API is very
sparsely documented IMHO and the Javadoc is bare-bones. But once I got into
it, I found that it was clean, rock-solid, and an absolute joy to use.
I use the TransportClient interface, and wrote my own simplified JSON
schema that I convert to ES mappings. I wrote my own command-line query and
update and bulk-load tools. I wrap these inside Bash scripts; the scripts
use a common set of utility scripts to set the classpath and other
configurations so that I am building, testing, and deploying with the
exact same set of jars. This is important! But if implemented with some
serious Computer Science thought blended with ease-of-use artistry, it's
well worth the effort. It means that I can deploy any ES update at any time
without waiting for some plug-in to catch up. And as an added benefit, it's
able to be built, tested, and deployed with one command; a true
"push-button" ease of use.
I add all of the ES jars in my classpath, and add the full Netty (because I
can't grok the subset that ES uses), the full Jackson 2 jars, and the LMAX
Disruptor. For production / QA servers, I write a thin HTTP REST server on
top of Netty, and talk ES on the back-end, but embed my business logic in
this server. Very high performance with a relatively tiny footprint.
The nice thing about the Java API is that it's much easier (for me, anyway)
to create complex queries and filters. While the JSON is clean, it's still
easy to muff a complex query. And the Java API lets me emit my constructed
queries as JSON, so it matches better with the on-line ES guides. And it
lets me create JSON queries that are preferred by this newsgroup and the
support folks. It's easier for me to understand the JSON that ES emits than
it is for me to construct the JSON that ES wants.
I don't know if this will help you or not; I hope that it does. This
newsgroup has been very helpful to me, and StackOverflow has also answered
a few key questions. Otherwise, I slogged through it on my own and ended up
with a code base that helps me use the features of ES that I need to easily
shine! Like any long-term investment, much effort up front means an easy go
of things in the long run.
Enjoy!
Brian
--
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/e69c0c26-0219-4e06-b5a4-76a5edbc0ab2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.