Short Roadmap to Speed Gaining with Elastic Search

Post date: May 26, 2013 9:42:50 AM

An important part regarding Elastic Search based functionality consists of the different queries that are to be performed and the way information needs to be presented and manipulated. In order to assure query efficiency, Elastic Search provides several tools that can be used in order to optimize data retrieval:

The "_explain" REST endpoint allows gaining more information about the means a query is internally analyzed by Elastic Search, this functionality being analogous to the one provided by RDBMS systems.

The "filtering" approach allows query implementers to speed data retrieval since these filters are cached.

"Scrolling" allows the temporary caching of data which is recommended in case of large data sets when the duration of requests is known for example in data transfer scenarios.

The "routing" query string parameter which is to be passed to the _search REST endpoint allows specifying explicit routing to certain shards in the cluster which helps gaining speed in case lots of data are to be searched for, in this case the search being explicitly targeted.

Warming up queries that are in general expensive and benefit from caching is another facility provided by Elastic Search through the "_warmer" index, this way allowing speed optimization through OS caching by executing these queries on the different Lucene segments after these are allocated as consequence of the commit operation.