2.2.2

Latest release in branch 2.2
Released 10 years ago (March 25, 2016)

Software Elasticsearch
Branch 2.2
Status
End of life
End of life Unavailable
First official release version 2.2.0
First official release date 10 years ago (January 27, 2016)
Release notes https://www.elastic.co/guide/en/elasticsearch/reference/2.2/release-notes.html
Source code https://github.com/elastic/elasticsearch/tree/2.2
Documentation https://www.elastic.co/guide/en/elasticsearch/reference/2.2/
Download https://www.elastic.co/downloads/elasticsearch
Elasticsearch 2.2 Releases View full list

What Is New in Elasticsearch 2.2

Elasticsearch 2.2 delivers significant enhancements in performance, query functionality, and cluster management. This release focuses on making complex operations faster and more intuitive for developers.

Category Key Changes
New Features Pipeline Aggregations, Doc Value Fields, Reindex API
Improvements Query performance, Indexing speed, Scripting engine
Bug Fixes Various stability and correctness fixes across core modules
Deprecations Facets, Old percolator syntax, Scripting languages

How does the new Reindex API simplify data management?

The Reindex API is a game-changer for rebuilding indices without external scripts. It allows you to copy documents from a source index to a destination index directly within the cluster.

In practice, this means you can reindex data after changing mappings or settings with a single API call. It handles scrolling, indexing, and conflict management internally, which is far more robust than DIY scripts.

POST _reindex
{
  "source": {
    "index": "old_index"
  },
  "dest": {
    "index": "new_index"
  }
}

What are Pipeline Aggregations and why are they useful?

Pipeline Aggregations let you compute advanced metrics over the results of other aggregations. This unlocks complex analytical queries that were previously impossible or required post-processing.

For example, you can now calculate the derivative of a time series or a moving average directly in your query. This matters because it moves complex computation from your application layer into the search engine, reducing code complexity and latency.

You can use buckets_path to reference other aggregations in the pipeline, creating powerful data transformation chains.

How do Doc Value Fields improve performance?

Doc Value Fields optimize how data is accessed for sorting and aggregations. They change the internal data structure from in-memory fielddata to disk-based doc values, which is more memory-efficient.

This significantly reduces heap usage, especially for high-cardinality fields. You'll see fewer garbage collection pauses and better cluster stability under heavy aggregation workloads.

The trade-off is slightly slower initial response times for aggregations, but the memory savings are almost always worth it in production environments.

What scripting changes should I be aware of?

Elasticsearch 2.2 tightens scripting security by disabling dynamic scripting by default. You now need to explicitly enable script types in the configuration file.

The Groovy scripting language is deprecated in favor of the new Painless language. If you're still using Groovy, start planning your migration now to avoid breaking changes in future versions.

For inline scripts, you must specify the lang parameter. The old format without it will no longer work.

"script": {
  "inline": "ctx._source.counter += count",
  "lang": "painless",
  "params": {
    "count": 4
  }
}

What's deprecated and needs migration planning?

Facets are completely removed in favor of aggregations. Any code still using the facets API will break and needs to be rewritten to use the aggregation framework.

The old percolator syntax is deprecated. You should migrate to the new percolator query syntax, which integrates better with the standard query DSL.

Several scripting languages (Groovy, JavaScript) are deprecated. The future is Painless, which offers better performance and security sandboxing.

FAQ

Why is my Groovy scripting suddenly failing?
Dynamic scripting is now disabled by default for security reasons. You need to enable it explicitly in elasticsearch.yml or switch to stored scripts. Better yet, migrate to Painless scripting.

How do I migrate from facets to aggregations?
The aggregation framework replaces facets with more powerful functionality. For terms facets, use terms aggregations. For statistical facets, use stats or extended_stats aggregations. The syntax is different but more consistent.

What's the performance impact of using Doc Values?
Doc Values reduce heap memory usage significantly but may slightly increase disk I/O. For most use cases, the memory reduction far outweighs the minimal disk read penalty, leading to better overall cluster stability.

Can I use the Reindex API to change mapping types?
Yes, that's one of its primary use cases. Copy documents from an old index to a new index with different mappings or settings. The API handles the transformation during the copy process.

Are Pipeline Aggregations expensive performance-wise?
They add computation overhead since they run on aggregation results. For simple pipelines on small result sets, the impact is minimal. For complex pipelines on large data volumes, monitor performance and consider application-side processing if needed.

Releases In Branch 2.2

Version Release date
2.2.2 10 years ago
(March 25, 2016)
2.2.1 10 years ago
(March 09, 2016)
2.2.0 10 years ago
(January 27, 2016)