From bfd661c16c5c4826abb6d6bb086e147fac2e60f1 Mon Sep 17 00:00:00 2001 From: Rob Gil Date: Tue, 13 Mar 2018 09:26:55 -0400 Subject: [PATCH] Adding compression documentation and example --- docs/index.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index 0354a5042..b234607f7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -258,6 +258,21 @@ bodies via post:: from elasticsearch import Elasticsearch es = Elasticsearch(send_get_body_as='POST') +Compression +~~~~~~~~~~~ +When using capacity constrained networks (low throughput), it may be handy to enable +compression. This is especially useful when doing bulk loads or inserting large +documents. This will configure compression on the *request*. + + from elasticsearch import Elasticsearch + es = Elasticsearch(hosts, + maxsize = 500, + connection_class=Urllib3HttpConnection, + timeout = 30, + http_compress = True + ) + + Running on AWS with IAM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~