我不明白elasticsearch滚动搜索中的解释
“保持初始搜索上下文的活动对于主动更新索引来说成本很高。”
上面这句话中的高成本是指内存占用吗?
那么,为什么内存占用这么高呢?
为了在保持活动状态的同时对索引的更新请求进行排队?
或者因为您正在内存中缓存活动索引快照?
"Keeping the initial search context alive has a high cost for actively updated indices."
Does the high cost in the sentence above refer to memory usage?
So, why is the memory usage so high?
In order to queue update requests of the index while remaining active?
Or because you're caching an active index snapshot in memory?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

来自 官方文档:
上述文档中添加了重点,以强调为什么在相当长的一段时间内保持一个或多个滚动上下文处于活动状态的成本很高。 Elasticsearch 尽力保持一切新鲜和活力并丢弃旧数据,但滚动上下文基本上是将旧数据放在生命支持上,并将其在角落里多存放一段时间,然后再让它使用当不再需要滚动上下文时死亡。
这就是为什么需要更多的资源(主要是存储、文件句柄和堆)来保持滚动上下文的活动,这就是所谓的“高成本”
From the official documentation:
The emphasis have been added to the above documentation to highlight why it is costly keep to one or many scroll contexts alive during a substantial period of time. Elasticsearch makes its best to keep everything fresh and alive and discard the old data, but a scroll context is basically putting old data on life support and stashing it in a corner for a bit more time, before letting it die when the scroll context is not needed anymore.
That's why more resources (mainly storage, file handles and heap) are needed to keep scroll contexts alive, that's what is referred to by "high cost"