Introduction
ElasticSearch functionalities can be easily integrated in any Java application in several ways, both via the REST API and native ones.
With the use of Java it's easy to call a REST HTTP interface with one of the many libraries available, such as Apache HttpComponents Client (http://hc.apache.org/). In this field there's no such thing as a most-used library; typically developers choose the library that suits their preferences the best or that they know very well.
Each JVM language can also use the native protocol to integrate ElasticSearch with their applications. The native protocol, discussed in Chapter 1, Getting Started, is one of the faster protocols available to communicate with ElasticSearch due to many factors, such as its binary nature, the fast native serializer/deserializer of data, the asynchronous approach for communicating, and the hop reduction (native client nodes are able to communicate directly with the node that contains the data without executing...