aparo/pyes — pull request #330 by stevencdavis (2013-09-11 21:24:39+00:00)
Title: add optional 'headers' param to allow for 'Accept-Encoding' headers

Add optional `headers` params to `search(...)` and `search_raw(...)` to allow users to use custom headers. In particular, this is useful for accepting gzip-compressed results from a remote server, which can result in better performance over low bandwidth or large result set scenarios.

*Hint: Use `headers={'Accept-Encoding' : 'gzip, deflate'}` to accept compressed results from elasticsearch. However, the server must be configured to allow compression for this to have any effect.*

This resolves #194.