Java REST client: gzip/compress request

There is not much documentation about how to compress a request - only this unanswered topic: Java REST client, GZIP compressed request

On the issue tracker there are several recent issues about how to handle gzipped responses, but I need to compress an index bulk request that includes several documents (>50). I'm using the low level client. Should I compress the content and additionally use GzipCompressingEntity? What about the header? Should I set Content-Encoding to gzip? It seems the underlying apache client supports this out of the box, is the same available for the Elasticsearch client?

Or how is it usually done to efficiently pipe lots of documents from a Java application into Elasticsearch?

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.