gpt4 book ai didi

elasticsearch - 更新ElasticSearch映射

转载 作者:行者123 更新时间:2023-12-02 23:31:44 26 4
gpt4 key购买 nike

我有一个索引超过30.000.000个文档。
我需要为即将发布的新文档添加一个新字段。
但是我需要指定这个新字段的正确映射。

此命令会导致对现有文档进行任何重新索引操作吗?

PUT /my_index/_mappings/my_type
{
"my_type": {
"properties": {
"A": {
"properties": {
"new_field": {
"type": "string",
"analyzer": "analyzer_keyword"
}
}
}
}
}
}

最佳答案

不,上面的查询不会导致任何类型的re-indexing。这只会在您的映射中添加一个新字段。如果您使用update existing documentcreate new document,则会添加新字段。
您可以引用here以获得更多详细信息。

关于elasticsearch - 更新ElasticSearch映射,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35697283/

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