从Elasticsearch 7.17迁移到Elasticsearch 8.x:陷阱和经验教训

  • What kind of changes we had to make to the codebase

    我们需要对代码库进行哪些更改

  • How we did the actual upgrade

    我们如何进行实际升级

  • What challenges we faced

    我们面临的挑战

  • How we did the data transfer

    我们如何进行数据传输

  • How the data was kept in sync

    数据如何保持同步

  • A step-by-step guide on how to upgrade Elasticsearch (read on to find out why).

    关于如何升级Elasticsearch的逐步指南(继续阅读以了解原因)。

We are a team from the Search & Browse department, the department in Zalando that is responsible for all things search (read: relevance, personalisation, sorting, filters, full text search, ... in short, everything that forms the search experience). The search applications are using Elasticsearch as the main datastore, so we are also the ones responsible for its well-being.

我们是Zalando的搜索和浏览部门的团队,负责所有与搜索相关的事务(即相关性、个性化、排序、过滤器、全文搜索等,总之,构成搜索体验的一切)。搜索应用程序使用Elasticsearch作为主要数据存储,因此我们也负责其运行状况。

Why upgrade

为什么要升级

We have been using Elasticsearch for a long time. It was upgraded more or less on a regular basis, but we were always a bit behind the latest version (Elastic has a regular release schedule; the releases are all scheduled well in advance). We were on version 7.17 for a while, and while we were pretty happy with it, we still had a few reasons to upgrade to 8.x.

我们已经使用Elasticsearch很长时间了。它经常进行升级,但我们总是稍微落后于最新版本(Elastic有一个定期发布计划,发布都提前安排好)。我们一直使用的是7.17版本,虽然我们对它还算满意,但我们仍有几个理由要升级到8.x版本。

First, we wanted to use the new features that were introduced in 8.0. Namely, the approximate kNN (k nearest neighbors) - or ANN-search. The vector search was already used in Search & Browse, but it was the exact kNN search, the brute-force and less performant one. What Elastic says about the approximate vs exact kNN search is this:

首先,我们想要使用8.0版本中引入的新功能。即,近似k最近邻(k nearest neighbors)- 或ANN搜索。向量搜索已经在搜索和浏览中使用,但它是精确k最近邻搜索,即蛮力和性能较差的搜索。Elastic关于近似与精确k最近邻搜索的说法是:

In most cases, you’ll want to use approximate kNN. Approximate kNN offers lower latency at the cost of slower indexing and imperfect accuracy.

在大多数情况下,您会希望使用近似的kNN。近似的kNN在延迟方面更低,但索引速度较慢,准确性也不完美。

Exact, brute-force kNN guarantees accurate results bu...

开通本站会员,查看完整译文。

首页 - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-23 06:53
浙ICP备14020137号-1 $访客地图$