Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch 更新数据的坑 #98

Open
lovelmh13 opened this issue Jul 4, 2021 · 0 comments
Open

Elasticsearch 更新数据的坑 #98

lovelmh13 opened this issue Jul 4, 2021 · 0 comments

Comments

@lovelmh13
Copy link
Owner

ES 中更新数据有一个默认 1s 刷新的时间,就是说更新完成 1s 内查询数据都是之前的数据,需要过 1s 以后才会变成新数据。

所以更新完成后,立即获取数据,获取到的还是老数据。

在索引、更新、删除时,加上 refresh: true 可以做到实时,但是在新增文档时,不太管用。

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant