如何手动触发刷新以获取弹性搜索索引?
在一些文章中,我发现了以下内容,以优化批量索引的性能。
甚至可以暂时完全关闭索引刷新(通过将间隔设置为 -1),例如,在批量索引运行期间,并在最后手动触发它。 参考
我们如何手动触发它?在索引上搜索是否手动触发它,因为我可以在创建索引后立即搜索索引,没有运行任何刷新 api。
In some of the articles I found the following, to optimizing performance for bulk indexing.
It can even make sense to temporarily turn off refreshing completely for an index (by setting the interval to -1), e.g., during a bulk indexing run, and trigger it manually at the end. reference
How do we manually trigger it? Does searching on index manually trigger it because I am able to search on the index just after it i created, didn't run any refresh api.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为了手动触发刷新,您只需要击中
_refresh
endpoint 在索引上搜索索引上不会自动触发刷新。刷新以重复的间隔发生,如
index.refresh_interval
index设置。如果设置为-1,则不会发生刷新,如果您想要新的数据,则需要手动触发它。In order to trigger the refresh manually, you simply need to hit the
_refresh
endpoint on an indexSearching on an index doesn't trigger the refresh automatically. Refreshes occur at recurring intervals, as specified by the
index.refresh_interval
index setting. If it's set to -1, then no refresh happens and you need to trigger it manually if you want fresh data.