Elasticsearch-dsl-py: How to specify `request_timeout`?

Created on 17 Nov 2015  路  5Comments  路  Source: elastic/elasticsearch-dsl-py

Most helpful comment

@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

All 5 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

abuzakaria picture abuzakaria  路  4Comments

gabrielpjordao picture gabrielpjordao  路  3Comments

primoz-k picture primoz-k  路  4Comments

mortada picture mortada  路  3Comments

berinhard picture berinhard  路  3Comments