You can provide params to the Search object: s = Search().params(request_timeout=5)
Can't we do that globally ? (sorry to comment on a closed issue, but I'm really wondering)
of course, when configuring the connection to elasticsearch you can specify any arguments to Elasticsearch, including timeout.
Was just looking for this and I'm thinking, isn't the timeout on the ElasticSearch class the connection timeout?, and not the request_timeout?
@hvdklauw request_timeout can be passed to any API call to override the global default, which is called just timeout when passing it to Elasticsearch.__init__.
The unfortunate difference in names is caused by some elasticsearch APIs that already accepted parameter timeout which refers to something else. You can find some more on this at [0]
0 - https://elasticsearch-py.readthedocs.io/en/master/api.html#timeout
Most helpful comment
@hvdklauw
request_timeoutcan be passed to any API call to override the global default, which is called justtimeoutwhen passing it toElasticsearch.__init__.The unfortunate difference in names is caused by some elasticsearch APIs that already accepted parameter
timeoutwhich refers to something else. You can find some more on this at [0]0 - https://elasticsearch-py.readthedocs.io/en/master/api.html#timeout