Elasticsearch 5.1.1 released
Today we are pleased to announce the release of Elasticsearch 5.1.1, based on Lucene 6.3.0. This is the latest stable release and is already available for deployment on Elastic Cloud, our Elasticsearch-as-a-service platform.
Latest stable release:
What happened to Elasticsearch 5.1.0? Elasticsearch 5.1.0 doesn’t exist because, for a short period of time, the Elastic Yum and Apt repositories included unreleased binaries labeled 5.1.0. To avoid confusion and upgrade issues for the people that have installed these without realizing, we decided to skip the 5.1.0 version and release 5.1.1 instead.
Full details of the changes in this release are available in the release notes listed above, but there are a few important changes which are worth mentioning.
Search improvements
-
The
query_string
andsimple_query_string
queries now support anall_fields
mode which allows querying all fields in the mapping when the_all
field is disabled. This is the first step towards removing the need for the_all
field entirely. - Term queries are no longer cached. The reason for this is twofold: term queries are almost always fast, and queries for thousands of terms can trash the query cache history, preventing more expensive queries from being cached.
- Very large term queries now produce significantly less old garbage, reducing garbage collection and improving performance.
- Geo-distance sorting now tracks a bounding box which contains the current top hits. Only candidates which fall within the bounding box need to perform an expensive geo calculation.
Painless scripting improvements
-
The
Debug.explain(var)
method throws an exception with the variable’s class and contents, for easier debugging. -
The
?
operator allows for null-safe deferences such as:Integer length = ctx._source.missing?.foo?.length();
-
The
?:
(Elvis) operator allows you to specify a default to be used when anull
is encountered:ctx._source.foo_length = ctx._source.missing?.foo?.length() ?: 0;
-
Arrays support negative offset addressing, e.g. the last element of an array can be specified as:
my_array[-1]
Other improvements
- DNS lookup of unicast hosts is now performed lazily, and the failure of a single host lookup does not prevent Elasticsearch from starting. Also, if a node disappears later on, DNS lookup is repeated in case the IP address associated with the hostname has changed.
- Reindex, update-by-query, and delete-by-query can now perform their tasks in parallel automatically.
- Searches can now be cancelled by the task management API, and search tasks include a description which identifies the query being run.
Please download Elasticsearch 5.1.1, try it out, and let us know what you think on Twitter (@elastic) or in our forum. You can report any problems on the GitHub issues page.