![](/img/trans.png)
[英]Is it possible to update an existing field in an index through mapping in Elasticsearch?
[英]Is it possible to update `store` value of the mapping of an existing field in ElasticSearch 6.x index?
我有一个由 ElasticSearch 6.8.7 创建的索引。 我查询了一些与文档字段不对应的字段,因为它们是文档字段的合并副本。 在创建索引时,它们的store
值设置为false
。 现在我需要获取亮点,但不存储查询字段内容。 我可以更新映射并将store
设置为true
吗? 索引的_source
已启用。 文档没有提到这种能力,我不能尝试更新我的生产集群上的store
。
不,这不对。
通常,无法更新现有字段的映射。 这条规则有一些例外。 例如:
- 可以将新属性添加到 Object 数据类型字段。
- 可以将新的多字段添加到现有字段。
- 可以更新 ignore_above 参数。
来源。
另外,我尝试更新示例索引上的映射,而 ES 不允许我更新现有字段的store
值。 这是可以理解的,但还是很难过。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.