nicolas-f
(Nicolas F)
July 10, 2018, 7:59am
1
Hi,
We will use the java high level client over a gsm connection. Using ngrep I see that POST content is not compressed. How to enable the compression mechanism in the java rest high level client for index request ?
Thanks,
Best regards
nicolas-f
(Nicolas F)
July 19, 2018, 6:48am
2
I've found some topics with the same subjects.
My use cases are within ES 2.4 & 5x; the goal being to feed GZIP content directly into an ES index through my Java application.
I'm aware that compressed (GZIP) content can be loaded via the REST end-points, but would like to do this within the Java API when publishing to ES.
I have enabled compression on the cluster (http.compression) as well as setting the "Content-Encoding" & "Accept-Encoding" on the request to "gzip", but that does not appear to help.
Has anyone had experience, or any tho…
But the issue with the Java Rest Client is related to this issue:
opened 07:41PM - 26 Apr 17 UTC
closed 03:34PM - 02 Apr 20 UTC
>enhancement
:Clients/Java Low Level REST Client
Currently it is possible to set a default header in the RestClient that indicate… s that all response should be compressed:
````
"Accept-Encoding": "gzip,deflate"
````
Though the underlying async client that the RestClient uses does not handle compressed content and instead will return a compressed entity. This means that users of RestClient must check the response entity and wrap it with a decompressor if they want to be able to handle compressed responses.
Similarly it is not possible to use compression in `reindex from remote` since the response entities are not decompressed by the rest client directly.
I don't know if the RestClient should do that automatically but we should be able to use compression in `reindex` even if this means adding an explicit decompressor in reindex.
system
(system)
Closed
August 16, 2018, 6:48am
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.