# OpenSearch Java Client - Set Codec Compression Level

**URL:** <https://forum.opensearch.org/t/opensearch-java-client-set-codec-compression-level/16075>\
**Category:** OpenSearch Client Libraries\
**Tags:** opensearch-java\
**Created:** [September 27, 2023, 11:15pm UTC](https://forum.opensearch.org/t/opensearch-java-client-set-codec-compression-level/16075 "2023-09-27T23:15:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sacpat74](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@sacpat74](https://forum.opensearch.org/u/sacpat74)\
**Post date:** [September 27, 2023, 11:15pm UTC](https://forum.opensearch.org/t/opensearch-java-client-set-codec-compression-level/16075/1 "2023-09-27T23:15:59Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
Java Client 2.6

**Describe the issue** :

I would like to use compression zstd with compression level as 6 (default is 3) but I can’t find anything in java client API to set compression level. I can set codec as zstd using IndexSettings but don’t see anything for compression level though. Can you please advise?

Plus, how do I set index settings through JSON file using java client API?

**Configuration** :

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![reta](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@reta](https://forum.opensearch.org/u/reta)\
**Post date:** [October 31, 2023, 6:43pm UTC](https://forum.opensearch.org/t/opensearch-java-client-set-codec-compression-level/16075/2 "2023-10-31T18:43:59Z")

</div>

Hi @sacpat74 , I don’t think it is supported at the moment, please feel free to open an issue at [Issues · opensearch-project/opensearch-java · GitHub](https://github.com/opensearch-project/opensearch-java/issues), thank you

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [December 30, 2023, 6:44pm UTC](https://forum.opensearch.org/t/opensearch-java-client-set-codec-compression-level/16075/3 "2023-12-30T18:44:42Z")

</div>

Closed on December 30, 2023, 6:44pm UTC

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