gpt4 book ai didi

elasticsearch - 为什么从1.x迁移到2.x时,Elasticsearch具有冲突的字段映射?

转载 作者:行者123 更新时间:2023-12-03 01:02:53 24 4
gpt4 key购买 nike

我想将 flex 从1.5.2升级到2.1.1,当我使用migration plugin查找要解决的问题时,在迁移本身之前,我在“冲突字段映射”上遇到错误。

在有关此问题的documentation中,它表示:

Fields with the same name, in the same index, in different types, must have the same mapping, with the exception of the copy_to, dynamic, enabled, ignore_above, include_in_all, and properties parameters, which may have different settings per field. [...] Elasticsearch will not start in the presence of conflicting field mappings. These indices must be deleted or reindexed using a new mapping.



我无法理解其原因。我的意思是为什么“具有相同名称,相同索引,不同类型的字段必须具有相同的映射”?

最佳答案

问题在于类型存储在相同的Lucene索引中。 Lucene不适用于类型的上下文。因此,在两种不同类型中使用时,字段名称与存储在Lucene中的名称相同。由于Lucene使用相同的名称,因此它们必须具有相同的类型。

因此,以下两个字段将添加到Lucene的同一字段中:

index    -   type   -   field
myindex - type_a - fieldOne
myindex - type_b - fieldOne

在lucene索引中全称为:fieldOne

关于elasticsearch - 为什么从1.x迁移到2.x时,Elasticsearch具有冲突的字段映射?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34996726/

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