---
title: "Migrating From Elasticsearch 7.17 to Elasticsearch 8.x: Pitfalls and Learnings"
description: "Zalando's Search & Browse team moved their multi-cluster Elasticsearch deployment from 7.17 to 8.x, mainly to get approximate kNN vector search."
url: "https://swe.quest/articles/migrating-from-elasticsearch-7-17-to-elasticsearch-8-x-pitfalls-and-learnings-0f126d1759a782b4"
canonical: "https://engineering.zalando.com/posts/2023/11/migrating-from-elasticsearch-7-to-8-learnings.html"
source: "Zalando Engineering"
published: "2023-11-19"
difficulty: "medium"
kind: "Case study"
reading_minutes: 20
tags: ["search","refactoring","jvm","testing","vector-search"]
---

# Migrating From Elasticsearch 7.17 to Elasticsearch 8.x: Pitfalls and Learnings

A post on [Zalando Engineering](https://swe.quest/sources/zalando.md), published 2023-11-19, 20 min read, Case study. Original: [https://engineering.zalando.com/posts/2023/11/migrating-from-elasticsearch-7-to-8-learnings.html](https://engineering.zalando.com/posts/2023/11/migrating-from-elasticsearch-7-to-8-learnings.html)

## Summary

Zalando's Search & Browse team moved their multi-cluster Elasticsearch deployment from 7.17 to 8.x, mainly to get approximate kNN vector search. They chose the official Elasticsearch Java API client over the community Scala client because it is officially maintained and has a kNN DSL. They first ran the old High Level REST Client in compatibility mode and used Testcontainers tests covering old/new client and cluster combinations. Those tests surfaced breaking changes they had to fix: the removed \_type field, null is\_write on aliases, date range bounds that had to be strings, action.destructive\_requires\_name now defaulting to true, and a mandatory nested.path on nested sorts. Cluster settings were also reworked, including node.roles, removal of deprecated thread pool and transport settings, and GC flags.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Search](https://swe.quest/tags/search.md) (Backend & APIs)
- [Refactoring & migrations](https://swe.quest/tags/refactoring.md) (Engineering practices)
- [Java & JVM](https://swe.quest/tags/jvm.md) (Languages)
- [Testing](https://swe.quest/tags/testing.md) (Engineering practices)
- [Vector search](https://swe.quest/tags/vector-search.md) (Data & databases)

## Prerequisites

- Elasticsearch basics ([easy posts on Search](https://swe.quest/tags/search.md?difficulty=easy))
- Scala/Java clients ([easy posts on Java & JVM](https://swe.quest/tags/jvm.md?difficulty=easy))
- Testcontainers

## Keywords

Elasticsearch, Elasticsearch Java API Client, Testcontainers, Origami, Scala, kNN search

## Related posts

- [Failing to Auto Scale Elasticsearch in Kubernetes](https://swe.quest/articles/failing-to-auto-scale-elasticsearch-in-kubernetes-c5af95622c43445d.md): Zalando Engineering · 2024-06-20 · Medium · 6 min read · Kubernetes, Incidents & postmortems, Search, Capacity planning, Debugging
  A schedule-driven Elasticsearch cluster run by es-operator on Kubernetes repeatedly failed to scale out for the morning peak.
- [Managing Elasticsearch Reindex at Scale: Performance, Reliability, and Observability](https://swe.quest/articles/managing-elasticsearch-reindex-at-scale-performance-reliability-and-12c26b4dcf9e376c.md): Palantir · 2026-06-08 · Medium · 14 min read · Search, Schema migrations, Resilience, Observability, System design
  Palantir's Gotham document store rebuilds Elasticsearch indices from its transactional database (the source of truth) rather than using Elasticsearch's \_reindex API, so search keeps serving live traffic throughout.
- [GitHub Issues search now supports nested queries and boolean operators: Here’s how we (re)built it](https://swe.quest/articles/github-issues-search-now-supports-nested-queries-and-boolean-operators-here-s-2684ca9cc7ff5489.md): GitHub Engineering · 2025-05-13 · Medium · 9 min read · Search, Ruby, Deployment, Refactoring & migrations, Testing
  GitHub rebuilt Issues search to support AND/OR operators and nested parentheses by replacing the flat-list parser with a PEG grammar (via the Ruby parslet library) that produces an abstract syntax tree.
- [Contentsquare Migration from Elasticsearch to ClickHouse](https://swe.quest/articles/contentsquare-migration-from-elasticsearch-to-clickhouse-052c118198db3e2f.md): ClickHouse · 2022-10-11 · Medium · 6 min read · Analytics & OLAP, Refactoring & migrations, Distributed databases, Performance engineering, Cost optimization
  Contentsquare replaced 14 Elasticsearch clusters with ClickHouse over a phased migration.
- [100x Faster: GraphQL Hive migration from Elasticsearch to ClickHouse](https://swe.quest/articles/100x-faster-graphql-hive-migration-from-elasticsearch-to-clickhouse-57650bfdbf95d1a8.md): ClickHouse · 2022-11-03 · Easy · 4 min read · Analytics & OLAP, Observability, GraphQL, Databases, Performance engineering
  GraphQL Hive replaced Elasticsearch with ClickHouse for storing per-request GraphQL monitoring data (consumer, requested fields, latency, request body) after query latency degraded with data growth and one large tenant slowed queries for smaller ones.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
