gpt4 book ai didi

elasticsearch - 更新成本与在 elasticsearch 中插入

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

我想更新 elasticsearch 中所有文档的两个字段。根据elasticsearch文档:

In Updating a Whole Document, we said that the way to update a document is to retrieve it, change it, and then reindex the whole document.


1-索引结构中部分更新和整体更新有什么区别?
2- 部分更新文档是否等同于删除和插入文档?

最佳答案

在elasticsearch后台更新文档是插入和删除操作的结合。
索引结构中部分更新和整体更新有什么区别?
Ans:- 在部分更新的情况下,您不会发送整个文档,这会给您的性能带来好处,因为您将不得不在网络上发送更少的数据,并且幕后的 ES 将部分更新与现有文档合并,并同时插入和删除两者操作发生。
2- 部分更新文档是否等同于删除和插入文档?
Ans:是的,在第一个答案中解释了更多。

关于elasticsearch - 更新成本与在 elasticsearch 中插入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63337882/

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