简体   繁体   English

ElasticSearch扫描和滚动获取更新帐户吗?

[英]Does ElasticSearch scan-and-scroll fetch account for updates?

Imagine i'm doing scan-and-scroll to perform an index migration. 想象一下,我正在扫描并滚动以执行索引迁移。 If i update a document during such operation, will i eventually see new version of that document in the document stream, or would it be just skipped? 如果在此操作期间更新文档,我最终会在文档流中看到该文档的新版本,还是只是被跳过?

It will be skipped as a scan operasion is like a snapshot in time before the document was updated. 由于扫描操作就像更新文档之前的快照一样,它将被跳过。 So the next scan you do will get the updates. 因此,您进行的下一次扫描将获取更新。 Here is a quout from Elasticsearch docs: 这是Elasticsearch文档中的一句话:

The results that are returned from a scroll request reflect the state of the index at the time that the initial search request was made, like a snapshot in time. 从滚动请求返回的结果反映了发出初始搜索请求时的索引状态,如时间快照。 Subsequent changes to documents (index, update or delete) will only affect later search requests. 对文档的后续更改(索引,更新或删除)只会影响以后的搜索请求。

Hope it helps. 希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM