# OpenSearch Client Libraries

**URL:** https://forum.opensearch.org/c/clients/60.md?page=3

[Latest](https://forum.opensearch.org/latest.md) · [Categories](https://forum.opensearch.org/categories.md) · [Tags](https://forum.opensearch.org/tags.md)

**Page:** 4

---

## [OpenSearch 1.3 Java HighLevelRestClient Range query not working for date field](https://forum.opensearch.org/t/opensearch-1-3-java-highlevelrestclient-range-query-not-working-for-date-field/15687)

<div class="topic-metadata">

**Author:** [@shantanusinghal](https://forum.opensearch.org/u/shantanusinghal)\
**Replies:** 0\
**Last updated:** [August 28, 2023, 6:08pm UTC](https://forum.opensearch.org/t/opensearch-1-3-java-highlevelrestclient-range-query-not-working-for-date-field/15687 "2023-08-28T18:08:07Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): org.opensearch.client:opensearch-rest-high-level-client/1.2.0 Describe the issue: The following Range query on a date fields (startTime and endTime) works …

---

## [Unable to update value in document to null](https://forum.opensearch.org/t/unable-to-update-value-in-document-to-null/15673)

<div class="topic-metadata">

**Author:** [@smic](https://forum.opensearch.org/u/smic)\
**Replies:** 1\
**Last updated:** [August 28, 2023, 5:56pm UTC](https://forum.opensearch.org/t/unable-to-update-value-in-document-to-null/15673 "2023-08-28T17:56:48Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Libraries used: ‘org.opensearch.client:opensearch-java:2.6.0’ ‘org.opensearch.client:opensearch-rest-client:2.9.0’ ‘org.opensearch.client:opensearch-rest-…

---

## [Print Query in JSON format](https://forum.opensearch.org/t/print-query-in-json-format/15504)

<div class="topic-metadata">

**Author:** [@slvrhwk](https://forum.opensearch.org/u/slvrhwk)\
**Replies:** 4\
**Last updated:** [August 15, 2023, 9:22pm UTC](https://forum.opensearch.org/t/print-query-in-json-format/15504 "2023-08-15T21:22:15Z")

</div>

Is there a way to print Query object to see their JSON representation? I’m trying to construct some queries and I want to print them locally to check if they look like how I expect them to. I’m using opensearch-java clie…

---

## [Rest Client - Precondition RunTimeException - JDK 17](https://forum.opensearch.org/t/rest-client-precondition-runtimeexception-jdk-17/14778)

<div class="topic-metadata">

**Author:** [@docme](https://forum.opensearch.org/u/docme)\
**Replies:** 4\
**Last updated:** [August 10, 2023, 2:21pm UTC](https://forum.opensearch.org/t/rest-client-precondition-runtimeexception-jdk-17/14778 "2023-08-10T14:21:48Z")

</div>

(relevant - OpenSearch): Describe: In porting to JDK 17 (error does not occur up thru JDK16), I am receiving a runtime outOfBoundsCheckFromIndexSize(oobef, fromIndex, size, length) exception from jdk.internal.util,Prec…

---

## [How can I get the Json DSL from a Query object in java client](https://forum.opensearch.org/t/how-can-i-get-the-json-dsl-from-a-query-object-in-java-client/11552)

<div class="topic-metadata">

**Author:** [@leonardo89](https://forum.opensearch.org/u/leonardo89)\
**Replies:** 4\
**Last updated:** [August 4, 2023, 2:34pm UTC](https://forum.opensearch.org/t/how-can-i-get-the-json-dsl-from-a-query-object-in-java-client/11552 "2023-08-04T14:34:37Z")

</div>

I’m using the last version of OpenSearch (2.4.x) and I want to know if it is possible to get the Json DSL of a query performed. For example: I have this query in the java client Query query = new Query.Builder() …

---

## [How to avoid code smells (too many if else) where each Property.Kind condition will call different Property.Builder() methods to create a specific type of Property?](https://forum.opensearch.org/t/how-to-avoid-code-smells-too-many-if-else-where-each-property-kind-condition-will-call-different-property-builder-methods-to-create-a-specific-type-of-property/15292)

<div class="topic-metadata">

**Author:** [@chintan\_patel](https://forum.opensearch.org/u/chintan_patel)\
**Replies:** 1\
**Last updated:** [August 2, 2023, 8:33pm UTC](https://forum.opensearch.org/t/how-to-avoid-code-smells-too-many-if-else-where-each-property-kind-condition-will-call-different-property-builder-methods-to-create-a-specific-type-of-property/15292 "2023-08-02T20:33:05Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Opensearch: 2.5.0 OpenSearch-Java: 2.4.0 Describe the issue: I am using the new opensearch-java (version 2.4.0) library to interact with the OpenSearch cl…

---

## [Setting rollover alias and \_is\_write\_index on index creation](https://forum.opensearch.org/t/setting-rollover-alias-and-is-write-index-on-index-creation/15277)

<div class="topic-metadata">

**Author:** [@larsy](https://forum.opensearch.org/u/larsy)\
**Replies:** 1\
**Last updated:** [July 26, 2023, 10:49pm UTC](https://forum.opensearch.org/t/setting-rollover-alias-and-is-write-index-on-index-creation/15277 "2023-07-26T22:49:50Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 2.5 Describe the issue: How do you set a rollover alias when creating an index with the OpenSearch client (C#)? Also, how do you set other attri…

---

## [Dynamic Template Variables not supported in OpenSearch Java client](https://forum.opensearch.org/t/dynamic-template-variables-not-supported-in-opensearch-java-client/15232)

<div class="topic-metadata">

**Author:** [@chintan\_patel](https://forum.opensearch.org/u/chintan_patel)\
**Replies:** 2\
**Last updated:** [July 25, 2023, 5:49pm UTC](https://forum.opensearch.org/t/dynamic-template-variables-not-supported-in-opensearch-java-client/15232 "2023-07-25T17:49:51Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch Version: 2.5.0 OpenSearch Java Version: 2.4.0 Describe the issue: I am trying to create a dynamic template for a new index, and would like to u…

---

## [How does rest-high-level client retries?](https://forum.opensearch.org/t/how-does-rest-high-level-client-retries/15062)

<div class="topic-metadata">

**Author:** [@bturgut](https://forum.opensearch.org/u/bturgut)\
**Replies:** 5\
**Last updated:** [July 16, 2023, 5:17pm UTC](https://forum.opensearch.org/t/how-does-rest-high-level-client-retries/15062 "2023-07-16T17:17:14Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): server - OpenSearch 2.5.0 client - Java High Level Rest Client 2.5.0 (github) Questions: (Relevant) Question 1 : Even though not well documented (or hard …

---

## [How to add ttl for the documents in an index](https://forum.opensearch.org/t/how-to-add-ttl-for-the-documents-in-an-index/14723)

<div class="topic-metadata">

**Author:** [@fcheragh](https://forum.opensearch.org/u/fcheragh)\
**Replies:** 2\
**Last updated:** [July 14, 2023, 1:58pm UTC](https://forum.opensearch.org/t/how-to-add-ttl-for-the-documents-in-an-index/14723 "2023-07-14T13:58:41Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Describe the issue: I am trying to add a time for purging documents after a certain period. It looks like this has been removed! And it leaves me manually d…

---

## [OpenSearch client response is very slow](https://forum.opensearch.org/t/opensearch-client-response-is-very-slow/14835)

<div class="topic-metadata">

**Author:** [@gotoamitarora](https://forum.opensearch.org/u/gotoamitarora)\
**Replies:** 4\
**Last updated:** [July 12, 2023, 7:31pm UTC](https://forum.opensearch.org/t/opensearch-client-response-is-very-slow/14835 "2023-07-12T19:31:47Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch.Client - 1.3.0 OpenSearch.Net - 1.3.0 Describe the issue: OpenSearch Client SearchAsync method is returning the results to the Class Model (Mod…

---

## [How to reload keystore or react on changes](https://forum.opensearch.org/t/how-to-reload-keystore-or-react-on-changes/15037)

<div class="topic-metadata">

**Author:** [@mafr](https://forum.opensearch.org/u/mafr)\
**Replies:** 0\
**Last updated:** [July 10, 2023, 2:56pm UTC](https://forum.opensearch.org/t/how-to-reload-keystore-or-react-on-changes/15037 "2023-07-10T14:56:54Z")

</div>

Hi, we’re running a Opensearch Cluster with TLS and want to connect with our Spring Boot application to it. We have a sidecar that generates the client keystore for us. Since the certs inside the Keystore expire at one…

---

## [Opensearch scoring script with bool filter java](https://forum.opensearch.org/t/opensearch-scoring-script-with-bool-filter-java/14980)

<div class="topic-metadata">

**Author:** [@slvrhwk](https://forum.opensearch.org/u/slvrhwk)\
**Replies:** 2\
**Last updated:** [July 6, 2023, 6:11pm UTC](https://forum.opensearch.org/t/opensearch-scoring-script-with-bool-filter-java/14980 "2023-07-06T18:11:52Z")

</div>

I have the following example from Opensearch documentation InlineScript inlineScript = new InlineScript.Builder() .source("knn\_score") .lang("knn") .params(Map.of( "field", JsonDa…

---

## [How to invoke plugin using opensearch-java client library?](https://forum.opensearch.org/t/how-to-invoke-plugin-using-opensearch-java-client-library/14854)

<div class="topic-metadata">

**Author:** [@rajesh](https://forum.opensearch.org/u/rajesh)\
**Replies:** 2\
**Last updated:** [July 3, 2023, 8:08am UTC](https://forum.opensearch.org/t/how-to-invoke-plugin-using-opensearch-java-client-library/14854 "2023-07-03T08:08:09Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 2.8.0 Describe the issue: We have custom opensearch plugin. We have been using rest high level client. Since rest high level client will be depre…

---

## [Java connection help to OpenSearch](https://forum.opensearch.org/t/java-connection-help-to-opensearch/14860)

<div class="topic-metadata">

**Author:** [@localforecast391](https://forum.opensearch.org/u/localforecast391)\
**Replies:** 1\
**Last updated:** [June 28, 2023, 8:08pm UTC](https://forum.opensearch.org/t/java-connection-help-to-opensearch/14860 "2023-06-28T20:08:53Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Java 8 Opensearch 2.4.0 Describe the issue: I’m unable to connect to my OpenSearch cluster due to versions compatibilities. I think this is because OpenSe…

---

## [How to connect to AWS OpenSearch Service without using AwsSdk2Transport](https://forum.opensearch.org/t/how-to-connect-to-aws-opensearch-service-without-using-awssdk2transport/14657)

<div class="topic-metadata">

**Author:** [@chintan\_patel](https://forum.opensearch.org/u/chintan_patel)\
**Replies:** 1\
**Last updated:** [June 27, 2023, 5:47pm UTC](https://forum.opensearch.org/t/how-to-connect-to-aws-opensearch-service-without-using-awssdk2transport/14657 "2023-06-27T17:47:13Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.5.0 Describe the issue: As the Java high-level REST Client is getting deprecating, I am planning to use Java Client version 2.4.0 (which is the latest) to…

---

## [Serialization is not working properly](https://forum.opensearch.org/t/serialization-is-not-working-properly/14754)

<div class="topic-metadata">

**Author:** [@gotoamitarora](https://forum.opensearch.org/u/gotoamitarora)\
**Replies:** 1\
**Last updated:** [June 21, 2023, 6:53am UTC](https://forum.opensearch.org/t/serialization-is-not-working-properly/14754 "2023-06-21T06:53:08Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Describe the issue: We are deserializing a JSON object from DynamoDB to AWS Opensearch using Elastic Search Stream and Lambda and also using …

---

## [OpenSearch.Net Method not found issue](https://forum.opensearch.org/t/opensearch-net-method-not-found-issue/14794)

<div class="topic-metadata">

**Author:** [@Denied5](https://forum.opensearch.org/u/Denied5)\
**Replies:** 3\
**Last updated:** [June 23, 2023, 11:46am UTC](https://forum.opensearch.org/t/opensearch-net-method-not-found-issue/14794 "2023-06-23T11:46:32Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Server: OpenSearch Version=“1.3” Client: .Net OpenSearch.Client Version=“1.3.0” .Net version: .Net 6.0 Describe the issue: Hi, I have faced issue while f…

---

## [Multiple Filter on Wild Card Search Query](https://forum.opensearch.org/t/multiple-filter-on-wild-card-search-query/14787)

<div class="topic-metadata">

**Author:** [@gotoamitarora](https://forum.opensearch.org/u/gotoamitarora)\
**Replies:** 0\
**Last updated:** [June 22, 2023, 5:14am UTC](https://forum.opensearch.org/t/multiple-filter-on-wild-card-search-query/14787 "2023-06-22T05:14:35Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): I am using OpenSearch Client Library version - 1.3.0 Describe the issue: I am trying to build one openSearch query in C# DotNet but could not able to achie…

---

## [Issues when using Opensearch & Elasticsearch rest high level clients - Any Lucene compatible version? Other solutions?](https://forum.opensearch.org/t/issues-when-using-opensearch-elasticsearch-rest-high-level-clients-any-lucene-compatible-version-other-solutions/14782)

<div class="topic-metadata">

**Author:** [@Johol](https://forum.opensearch.org/u/Johol)\
**Replies:** 1\
**Last updated:** [June 21, 2023, 7:31pm UTC](https://forum.opensearch.org/t/issues-when-using-opensearch-elasticsearch-rest-high-level-clients-any-lucene-compatible-version-other-solutions/14782 "2023-06-21T19:31:10Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Opensearch rest high level client version = 2.5.0 Elasticsearch rest high level client version = 7.17.1 Describe the issue: Hi! I am working with a maven…

---

## [Setting socket timeout on golang client](https://forum.opensearch.org/t/setting-socket-timeout-on-golang-client/14736)

<div class="topic-metadata">

**Author:** [@msfroh](https://forum.opensearch.org/u/msfroh)\
**Replies:** 2\
**Last updated:** [June 20, 2023, 8:29pm UTC](https://forum.opensearch.org/t/setting-socket-timeout-on-golang-client/14736 "2023-06-20T20:29:38Z")

</div>

I was recently working with a customer who uses the Go client to connect to OpenSearch and they saw a timeout that propagated back to their users when a node got replaced. From my experience with the Java client, I thou…

---

## [Unable to Parse response body error](https://forum.opensearch.org/t/unable-to-parse-response-body-error/14340)

<div class="topic-metadata">

**Author:** [@Sriram](https://forum.opensearch.org/u/Sriram)\
**Replies:** 3\
**Last updated:** [June 16, 2023, 4:30pm UTC](https://forum.opensearch.org/t/unable-to-parse-response-body-error/14340 "2023-06-16T16:30:17Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 1.3.9 and 1.3.4 Describe the issue: We are evaluating migration of Elasticsearch(7.17.0) to Opensearch(1.3.9/1.3.4), high level rest REST client(1.3.9/1.3.…

---

## [Difference between Apache HttpClient 5 Transport and RestClient Transport](https://forum.opensearch.org/t/difference-between-apache-httpclient-5-transport-and-restclient-transport/14650)

<div class="topic-metadata">

**Author:** [@chintan\_patel](https://forum.opensearch.org/u/chintan_patel)\
**Replies:** 1\
**Last updated:** [June 12, 2023, 7:23pm UTC](https://forum.opensearch.org/t/difference-between-apache-httpclient-5-transport-and-restclient-transport/14650 "2023-06-12T19:23:25Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): I am currently working on migrating from ElasticSearch version 1.7.2 to AWS OpenSearch Service (OpenSearch 2.8.0). Describe the issue: I have an option to …

---

## [How to create document with dynamic schema over Java API?](https://forum.opensearch.org/t/how-to-create-document-with-dynamic-schema-over-java-api/14620)

<div class="topic-metadata">

**Author:** [@Evan](https://forum.opensearch.org/u/Evan)\
**Replies:** 1\
**Last updated:** [June 9, 2023, 6:29pm UTC](https://forum.opensearch.org/t/how-to-create-document-with-dynamic-schema-over-java-api/14620 "2023-06-09T18:29:21Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): dependencies { implementation ‘org.opensearch.client:opensearch-rest-client: 2.7.0’ implementation ‘org.opensearch.client:opensearch-java:2.4.0’ } Descri…

---

## [Snapshot client documentation confusion](https://forum.opensearch.org/t/snapshot-client-documentation-confusion/14448)

<div class="topic-metadata">

**Author:** [@sdhoyt](https://forum.opensearch.org/u/sdhoyt)\
**Replies:** 4\
**Last updated:** [June 6, 2023, 5:49pm UTC](https://forum.opensearch.org/t/snapshot-client-documentation-confusion/14448 "2023-06-06T17:49:08Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): opensearch-py version 2.2.0 python version 3.9.2 Debian GNU/Linux 11 (bullseye) Describe the issue: I’m struggling to understand how to use the Snapshot …

---

## [Construct search request from XContentBuilder](https://forum.opensearch.org/t/construct-search-request-from-xcontentbuilder/14575)

<div class="topic-metadata">

**Author:** [@slvrhwk](https://forum.opensearch.org/u/slvrhwk)\
**Replies:** 0\
**Last updated:** [June 6, 2023, 5:44pm UTC](https://forum.opensearch.org/t/construct-search-request-from-xcontentbuilder/14575 "2023-06-06T17:44:04Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Amazon Opensearch 2.5 Describe the issue: I am using the java high level rest client to construct and perform a search on my opensearch index. The query is…

---

## [Opensearch 2.7.x client documentation](https://forum.opensearch.org/t/opensearch-2-7-x-client-documentation/14424)

<div class="topic-metadata">

**Author:** [@firated](https://forum.opensearch.org/u/firated)\
**Replies:** 2\
**Last updated:** [May 23, 2023, 6:36am UTC](https://forum.opensearch.org/t/opensearch-2-7-x-client-documentation/14424 "2023-05-23T06:36:58Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 2.7.x Describe the issue: Hi, while I have been checking the documentation of opensearch clients for 2.7.x on Java client - OpenSearch documenta…

---

## [No Support to change the default bucket value in MultiTermAggregation](https://forum.opensearch.org/t/no-support-to-change-the-default-bucket-value-in-multitermaggregation/14360)

<div class="topic-metadata">

**Author:** [@sagar.verma1919](https://forum.opensearch.org/u/sagar.verma1919)\
**Replies:** 1\
**Last updated:** [May 17, 2023, 8:06am UTC](https://forum.opensearch.org/t/no-support-to-change-the-default-bucket-value-in-multitermaggregation/14360 "2023-05-17T08:06:15Z")

</div>

2.4.0 (relevant - OpenSearch/Dashboard/Server OS/Browser): Describe the issue: Currently there is no support to provided in Java Client library for the parameters mentioned in this document Bucket aggregations - OpenSe…

---

## [IDE doesn't see Error type in opensearch-go example](https://forum.opensearch.org/t/ide-doesnt-see-error-type-in-opensearch-go-example/14224)

<div class="topic-metadata">

**Author:** [@zhanismagulova26](https://forum.opensearch.org/u/zhanismagulova26)\
**Replies:** 4\
**Last updated:** [May 13, 2023, 2:59pm UTC](https://forum.opensearch.org/t/ide-doesnt-see-error-type-in-opensearch-go-example/14224 "2023-05-13T14:59:54Z")

</div>

Describe the issue: There are occure errors with unresolved type Error But opensearch api see other types in package opensearchapi but not type Error Relevant Logs or Screenshots:

---

## [Node-js: client.helpers.bulk() : get errors on fail?](https://forum.opensearch.org/t/node-js-client-helpers-bulk-get-errors-on-fail/14200)

<div class="topic-metadata">

**Author:** [@Tegatoo](https://forum.opensearch.org/u/Tegatoo)\
**Replies:** 2\
**Last updated:** [May 4, 2023, 5:02pm UTC](https://forum.opensearch.org/t/node-js-client-helpers-bulk-get-errors-on-fail/14200 "2023-05-04T17:02:37Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.7.x Describe the issue: Consider a code: try { var response = await this.client.helpers.bulk({ datasource: upserts, onDocumen…

[Previous page](https://forum.opensearch.org/c/clients/60.md?page=2)

[Next page](https://forum.opensearch.org/c/clients/60.md?page=4)
