What Is New in Elasticsearch 6.2
Elasticsearch 6.2 delivers significant enhancements in search performance, indexing efficiency, and operational management. This release focuses on making complex queries faster and simplifying cluster administration for developers.
| Category | Key Updates |
|---|---|
| New Features | Painless Scripting Debugger, Index Sorting, CCR Auto-Follow |
| Improvements | Faster Terms Query, Indexing Performance Boost, Enhanced Geo Queries |
| Bug Fixes | Various fixes for aggregation, mapping, and node discovery |
How does the new Painless debugger help with script development?
The Painless scripting debugger is a major addition for developers writing complex scripts. It allows you to set breakpoints, step through code, and inspect variables in real-time, directly from Kibana.
This is a game-changer for debugging scripted fields, update-by-query operations, or complex painless scripts in ingest pipelines. You no longer have to rely solely on print statement debugging, which dramatically speeds up development and troubleshooting.
What performance gains can I expect from index sorting?
Index sorting pre-sorts documents on disk during indexing according to your specified criteria. This can yield massive speed improvements for range queries and aggregations that align with the sort order.
In practice, if you frequently query time-based data with range aggregations, sorting your index by @timestamp can make those queries significantly faster. The trade-off is a slight increase in indexing time and storage overhead, but the read performance boost is often worth it.
How has the terms query been optimized?
The terms query execution has been rewritten to be much more efficient, especially for large sets of terms. It now avoids internal conversions and uses a more direct lookup method.
This matters because queries with hundreds or thousands of terms in an IN-like clause will see a substantial reduction in latency and CPU overhead. It's a backend improvement that requires no changes to your queries but delivers free performance gains.
What is CCR auto-follow and why is it useful?
Cross-Cluster Replication (CCR) auto-follow automatically replicates new indices from a remote leader cluster that match a specified pattern. You define a pattern once, and any new index that matches it will be replicated without manual intervention.
This automates a previously manual process, making it ideal for log or event-driven data patterns where new time-based indices are created daily or hourly. It simplifies the management of a replication setup across clusters.
FAQ
Does the Painless debugger work with all script types?
Yes, the debugger supports Painless scripts used in search queries, scripted fields, ingest processors, and update-by-query operations, providing broad debugging coverage.
Is there an indexing performance cost to enabling index sorting?
Yes, there is a minor overhead during the indexing process as data must be sorted before being written to disk. However, the significant query performance gains for sorted-range scans often justify this cost.
Do I need to change my existing terms queries to benefit from the optimization?
No, the optimization is entirely on the execution side. Your existing queries using the terms query will automatically run faster without any modification required.
Can I use CCR auto-follow with existing indices?
No, auto-follow patterns only apply to new indices created on the leader cluster after the pattern is set up. Existing indices must be followed using the manual follow API.
Are there any new geo-point field optimizations?
Yes, the performance of geo-point queries that use the indexed option has been improved. Queries like geo-distance and geo-bounding box should see reduced latency.