ElasticSearch更新后延迟解决方法

在index后有一个refresh_interval默认1秒,在这个时间间隔内search是不可见的。
解决办法有两种:
1,通过ui层解决。操作成功后只操作UI,而不是通过ES。
2,搜索时加上?refresh=wait_for,表示如果1秒内有请求立即更新并可见。

参考:
https://stackoverflow.com/questions/31499575/how-to-deal-with-elasticsearch-index-delay
https://www.elastic.co/guide/en/elasticsearch/reference/5.0/docs-refresh.html#docs-refresh

猜你喜欢

转载自blog.csdn.net/wlchn/article/details/74993463