What Is New in Elasticsearch 1.5
Elasticsearch 1.5 delivers significant performance gains, new aggregation features, and critical resiliency improvements. This release focuses on making existing functionality faster and more robust for production environments.
| Category | Key Updates |
|---|---|
| New Features | Date histogram interval, Scripted metric aggregations, IP range aggregations |
| Performance | Doc values as default, Faster terms aggregations, Concurrent snapshot/restore |
| Resiliency | Shard allocation controls, Disk-based allocation settings |
| Mapping | Dynamic template improvements, Geo_point validation |
| Bug Fixes | Over 100 issues resolved across core, scripting, and discovery |
How did aggregation performance improve?
This release makes terms aggregations significantly faster and less memory-intensive by using doc values as the default fielddata source. In practice, this means aggregations on non-analyzed fields run with much lower heap overhead.
The new scripted_metric aggregation allows for custom metric calculations using scripts, providing flexibility beyond the built-in metric types. You can now perform complex, multi-step computations within a single aggregation.
What are the new date histogram intervals?
Date histogram aggregations now support fixed intervals like 1d, 2h, and 10m instead of only calendar-aware intervals. This matters because fixed intervals provide predictable bucket sizes regardless of daylight saving time or calendar irregularities.
You can specify these intervals using the interval parameter instead of the older time_interval parameter, which offers more consistent behavior across different time zones.
How is cluster resiliency better now?
Elasticsearch 1.5 introduces finer control over shard allocation with new settings like cluster.routing.allocation.allow_rebalance. This helps prevent problematic rebalancing during node failures or network partitions.
Disk-based allocation settings were enhanced to better prevent nodes from running out of disk space. The improved watermarks trigger earlier warnings and smarter shard relocation decisions.
What scripting changes should I know about?
The MVEL scripting language has been removed due to security concerns. You should migrate existing scripts to Groovy or another supported language like JavaScript or Python.
Script compilation is now cached more aggressively, reducing overhead for frequently executed scripts. This improves performance for dynamic scripting scenarios without compromising security.
FAQ
Why are doc values now the default and how does it affect my queries?
Doc values are enabled by default because they offer better performance for aggregations and sorting while using off-heap memory. Your existing queries will work exactly the same, but they'll likely run faster with less garbage collection overhead.
How do I migrate my MVEL scripts to Groovy?
Most MVEL scripts will work in Groovy with minimal changes. The syntax is very similar. You need to update your script configuration to specify lang: groovy and test the scripts for any edge case differences in variable handling or method calls.
What's the difference between the new 'interval' and old 'time_interval' parameters?
The new interval parameter uses fixed units (always 24h for a day) while time_interval used calendar-aware units (which could be 23h or 25h due to DST). For consistent bucket sizes, use the new interval parameter.
Can I still use the _timestamp field mapping?
Yes, but it's now deprecated. You should transition to using a regular date field and either explicitly provide timestamps in your documents or use the index.default_timestamp setting as a fallback.
How does the concurrent snapshot/restore improvement help?
Previously, snapshot and restore operations were largely sequential. Now multiple shards can be processed simultaneously, significantly reducing backup and recovery times for large indices, especially on modern storage systems.