Introduction
ElasticSearch functionalities can be easily integrated in every Java application in several ways, both via REST API then 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 is no library which is used the most; typically developers choose the library that best suits their taste or that they know very well.
Every JVM language can also use the Native protocol to integrate ElasticSearch in their products. The Native protocol, discussed in Chapter 1, Getting Started, is one of the fastest protocols available to communicate with ElasticSearch due to many factors, such as its binary nature, the fast native serializer/deserializer of the data, the asynchronous approach for communicating and the hop reduction (native client is able to communicate directly with the node that contains the data without executing a double hop needed in...