-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Closed
Labels
:Clients/Java Low Level REST ClientMinimal dependencies Java Client for ElasticsearchMinimal dependencies Java Client for Elasticsearch>enhancementTeam:Data ManagementMeta label for data/management teamMeta label for data/management team
Description
The Rest client has transparent support for compressed responses, but no support for compressed requests.
The low-level client should make it easy to compress request bodies, either globally or per-request. The high-level client should automatically benefit from this feature.
Compressing the request body should be driven by adding the corresponding header on RequestOptions, e.g.:
RequestOptions gzipOptions = RequestOptions.DEFAULT.toBuilder().addHeader("Content-Encoding", "gzip").build();
esClient.search(new SearchRequest("foo"), gzipOptions);We can also add a more convenient RequestOption.compress(true) but ultimately that will set the header option as illustrated above, since that header can always be set directly.
cykl, Hakky54 and girishlogicmonitor
Metadata
Metadata
Assignees
Labels
:Clients/Java Low Level REST ClientMinimal dependencies Java Client for ElasticsearchMinimal dependencies Java Client for Elasticsearch>enhancementTeam:Data ManagementMeta label for data/management teamMeta label for data/management team