gpt4 book ai didi

elasticsearch - 为什么我们在ElasticSearch索引中仍然有 `doc_types`?

转载 作者:行者123 更新时间:2023-12-03 00:49:32 25 4
gpt4 key购买 nike

Elasticsearch 6.0中的“重大更改”之一是删除索引中的多种映射类型。
release notice指出

The ability to have multiple mapping types per index has been removed in 6.0. New indices will be restricted to a single type.


删除的原因是 here

In an Elasticsearch index, fields that have the same name in different mapping types are backed by the same Lucene field internally.

This can lead to frustration when, for example, you want deleted to be a date field in one type and a boolean field in another type in the same index.

On top of that, storing different entities that have few or no fields in common in the same index leads to sparse data and interferes with Lucene’s ability to compress documents efficiently.


他们的解决方案有不同的映射到 have an index per document type. 我的问题是为什么我们现在需要doc_types了?现在不只是嵌套索引吗?

最佳答案

Elasticsearch 6使用它来实现与5.x的向后兼容性。 Elasticsearch 7弃用它,这是希望在以后的更新中删除某些内容的标准做法。

Elasticsearch主要版本支持由先前的主要版本创建的索引,否则每个人在更新时都会丢失其数据。它将在8.0.0中完全删除。

关于elasticsearch - 为什么我们在ElasticSearch索引中仍然有 `doc_types`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55859024/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com