如何手动触发刷新以获取弹性搜索索引?

发布于 2025-01-18 04:55:25 字数 307 浏览 2 评论 0原文

在一些文章中,我发现了以下内容,以优化批量索引的性能。

甚至可以暂时完全关闭索引刷新(通过将间隔设置为 -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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情绪失控 2025-01-25 04:55:25

为了手动触发刷新,您只需要击中 _refresh endpoint 在索引

POST your-index/_refresh

上搜索索引上不会自动触发刷新。刷新以重复的间隔发生,如index.refresh_interval index设置。如果设置为-1,则不会发生刷新,如果您想要新的数据,则需要手动触发它。

In order to trigger the refresh manually, you simply need to hit the _refresh endpoint on an index

POST your-index/_refresh

Searching 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文