python操作es如何处理timeout超时的问题

第一种方法,添加超时参数

 

 第二种方法:

在es语句中添加超时参数

res = es.search(index=name, body=body, scroll='5m', size=100000, request_timeout=60)

第三种方法:

在连接处配置:

 之前写的第二种方法有错误,现在已改正

posted @ 2020-07-14 12:00  阿磊小哥哥呀  阅读(2416)  评论(0编辑  收藏  举报