ElasticSearch updates are not immediate, how do you wait for ElasticSearch to finish updating it's index?

前端 未结 4 460
耶瑟儿~
耶瑟儿~ 2020-12-16 11:13

I\'m attempting to improve performance on a suite that tests against ElasticSearch.

The tests take a long time because Elasticsearch does not update it\'s indexes i

4条回答
  •  清歌不尽
    2020-12-16 11:45

    Seems to work for me:

    els.indices.refresh(index)
    els.cluster.health(wait_for_no_relocating_shards=True,wait_for_active_shards='all')
    

提交回复
热议问题