gpt4 book ai didi

elasticsearch - Elasticsearch :更新现有索引中一个字段的映射

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

我有一个具有以下映射的索引:

{
"code_sourcenodedupefilecontractv4_1421_shared_5dd3788f-2d0a-4a49-b679-98bbf519013e": {
"mappings": {
"SourceNoDedupeFileContractV4": {
"_meta": {
"version": 1421
},
"_routing": {
"required": true
},
"properties": {

.
.
.
.

"indexedTimeStamp": {
"type": "date",
"store": true,
"doc_values": false,
"format": "epoch_second"
},
.
.
.
.
.

}
}
}
}
}

我必须将字段 doc_value更改为 true。我尝试了以下方法,但尝试时出现异常。
PUT code_sourcenodedupefilecontractv4_1421_shared_5dd3788f-2d0a-4a49-b679-98bbf519013e/_mapping/SourceNoDedupeFileContractV4
{
"properties": {
"indexedTimeStamp": {
"type": "date",
"doc_values" : true
}
}
}

我遇到的异常是在尝试命令时:
    {
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Mapper for [indexedTimeStamp] conflicts with existing mapping in other types:\n[mapper [indexedTimeStamp] has different [store] values, mapper [indexedTimeStamp] has different [doc_values] values, mapper [indexedTimeStamp] has different [format] values]"
}
],
"type": "illegal_argument_exception",
"reason": "Mapper for [indexedTimeStamp] conflicts with existing mapping in other types:\n[mapper [indexedTimeStamp] has different [store] values, mapper [indexedTimeStamp] has different [doc_values] values, mapper [indexedTimeStamp] has different [format] values]"
},
"status": 400
}

知道我在做什么错吗?任何帮助将非常感激。

最佳答案

doc_values 无法更新。

您将必须删除索引以更新映射并为数据重新索引。

看到我的answer about reindexing

关于elasticsearch - Elasticsearch :更新现有索引中一个字段的映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58691176/

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