How to retrieve http.max_content_length from cluster settings in Elasticsearch on AWS

470 Views Asked by At

My task is to retrieve the max_content_length from cluster settings to control the size of the bulk request I am sending to AWS Elasticsearch.

I learned that I can do this by using the GET _cluster/settings?include_defaults API.

When I connect to AWS Elasticsearch endpoint and invoke the GET cluster API, I am able to get a response but the body does not contain http.max_content_length.

I have tried running this API on my local installation of Elasticsearch, I can see http.max_content_length in the response body and I am able to extract the value I need.

I have also searched the AWS and Elasticsearch documentation/forums, but couldn't find any leads.

Is there something else I should do to get the max_content_length from the GET cluster settings API in AWS Elasticsearch? Or is there another way I can achieve what I need? Is the goal I'm trying to achieve feasible?

Other information: AWS is running Elasticsearch 7.17. I am using Java and Okhttp to send requests to Elasticsearch.

I don't need to update max_content_length and I just need to read it.

Edit: Just want to add I need to do this programatically, i.e. extract the max_content_length from json response of Elasticsearch API

Any help is greatly appreciated, thanks!

0

There are 0 best solutions below