小编PRI*_*PAI的帖子

如何更新Elasticsearch中的映射以更改字段数据类型并更改字符串中的分析器类型

在尝试更新映射时,我收到以下错误:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"mapper [timestamp] of different type, current_type [string], merged_type [date]"}],"type":"illegal_argument_exception","reason":"
mapper [timestamp] of different type, current_type [string], merged_type [date]"},"status":400}
Run Code Online (Sandbox Code Playgroud)

我试图在Windows上运行以下命令

   curl -XPUT localhost:9200/logstash-*/_mapping/log?update_all_types -d "{
    "properties":
    {
        "timestamp": 
        {
            "type": "date", 
            "format": "MM-dd-yyyy HH:mm:ss",
            "fielddata":{"loading" : "lazy"} }
        }
    }";
Run Code Online (Sandbox Code Playgroud)

如何使用特定格式将日期字段的数据类型从字符串更改为日期类型.

我试图更改字符串数据类型的映射以将其更改为eager加载和not_analyzed分析,但它会出现以下错误:

{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [AppName] conflicts with existing mapping in other types:\n[mapper [AppName] has different [index] values, mapper [App
 different [doc_values] values, cannot change from disabled to enabled, mapper [AppName] has different [analyzer]]"}],"type":"illegal_argument_exception","reason":"Mapper for [AppName] conflict …
Run Code Online (Sandbox Code Playgroud)

mapping elasticsearch

12
推荐指数
2
解决办法
2万
查看次数

标签 统计

elasticsearch ×1

mapping ×1