The latest version of Elasticsearch provides a new way to optimize the index. Using the shrink API, it's possible to reduce the number of shards of an index.
This feature targets several common scenarios:
- There will be the wrong number of shards during the initial design sizing. Often, sizing the shards without knowing the correct data or text distribution tends to oversize the number of shards.
- Reducing the number of shards to reduce memory and resource usage.
- Reducing the number of shards to speed up searching.