# \#opensearch-java

**URL:** https://forum.opensearch.org/tag/opensearch-java/4.md

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

---

## [How to sort by a sub-aggregation field in multi\_terms aggregation using opensearch-java 3.1.0?](https://forum.opensearch.org/t/how-to-sort-by-a-sub-aggregation-field-in-multi-terms-aggregation-using-opensearch-java-3-1-0/27984)

<div class="topic-metadata">

**Author:** [@UmangKamdar](https://forum.opensearch.org/u/UmangKamdar)\
**Replies:** 1\
**Last updated:** [April 14, 2026, 12:43am UTC](https://forum.opensearch.org/t/how-to-sort-by-a-sub-aggregation-field-in-multi-terms-aggregation-using-opensearch-java-3-1-0/27984 "2026-04-14T00:43:54Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): org.opensearch.client:opensearch-java:3.1.0 OpenSearch cluster version: 3.1 Describe the issue: I’m trying to sort buckets by a metric sub-aggregation in…

---

## [Best approach to generate embeddings for 10K+ documents in Spring Boot + OpenSearch (performance issue)](https://forum.opensearch.org/t/best-approach-to-generate-embeddings-for-10k-documents-in-spring-boot-opensearch-performance-issue/27956)

<div class="topic-metadata">

**Author:** [@NaveenM](https://forum.opensearch.org/u/NaveenM)\
**Replies:** 0\
**Last updated:** [March 30, 2026, 10:07am UTC](https://forum.opensearch.org/t/best-approach-to-generate-embeddings-for-10k-documents-in-spring-boot-opensearch-performance-issue/27956 "2026-03-30T10:07:27Z")

</div>

I am building a search system using Spring Boot and OpenSearch. Current setup: Using OpenSearch ingest pipeline with text\_embedding processor Each ZIP file contains 10K+ documents Bulk indexing is used Problem: Ind…

---

## [Opensearch rest high level client usage](https://forum.opensearch.org/t/opensearch-rest-high-level-client-usage/27892)

<div class="topic-metadata">

**Author:** [@Nagpraveen](https://forum.opensearch.org/u/Nagpraveen)\
**Replies:** 1\
**Last updated:** [March 2, 2026, 10:54pm UTC](https://forum.opensearch.org/t/opensearch-rest-high-level-client-usage/27892 "2026-03-02T22:54:04Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Opensearch 3.5 Opensearch java rest high level client: 3.5 Describe the issue: We observed that, for the new release of opensearch version 3.5, theres is a…

---

## [\[Java Client\] New Bulk Ingest helper](https://forum.opensearch.org/t/java-client-new-bulk-ingest-helper/27641)

<div class="topic-metadata">

**Author:** [@janhoy](https://forum.opensearch.org/u/janhoy)\
**Replies:** 0\
**Last updated:** [December 22, 2025, 10:52am UTC](https://forum.opensearch.org/t/java-client-new-bulk-ingest-helper/27641 "2025-12-22T10:52:41Z")

</div>

For users of the opensearch-java client. We have contributed a port of Bulk Ingest Helper, which is similar to the RestHighLevelClient’s BulkProcessor. This means your client code can simply add documents to the bulk h…

---

## [Java Client - Derived Type Mappings](https://forum.opensearch.org/t/java-client-derived-type-mappings/27267)

<div class="topic-metadata">

**Author:** [@chriswhite](https://forum.opensearch.org/u/chriswhite)\
**Replies:** 2\
**Last updated:** [November 22, 2025, 2:49am UTC](https://forum.opensearch.org/t/java-client-derived-type-mappings/27267 "2025-11-22T02:49:06Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 3.1.0 Describe the issue: OpenSearch has supported Derived fields since 2.15 ( Derived - OpenSearch Documentation ), but it appears the java client org.open…

---

## [Is semantic field supported in the latest Java client?](https://forum.opensearch.org/t/is-semantic-field-supported-in-the-latest-java-client/27499)

<div class="topic-metadata">

**Author:** [@frankz](https://forum.opensearch.org/u/frankz)\
**Replies:** 1\
**Last updated:** [November 18, 2025, 10:51pm UTC](https://forum.opensearch.org/t/is-semantic-field-supported-in-the-latest-java-client/27499 "2025-11-18T22:51:06Z")

</div>

Semantic field type is introduced in OS 3.1, we recently updated the OpenSearch Java lib to version 3.2, but the semantic field type is not supported. Will it be supported by any new version?

---

## [Customizing De/Serialization](https://forum.opensearch.org/t/customizing-de-serialization/27477)

<div class="topic-metadata">

**Author:** [@workmanw](https://forum.opensearch.org/u/workmanw)\
**Replies:** 2\
**Last updated:** [November 13, 2025, 8:10pm UTC](https://forum.opensearch.org/t/customizing-de-serialization/27477 "2025-11-13T20:10:28Z")

</div>

Versions: Open Search 2.19 Java SDK Describe the issue: I’m looking for guidance on how best to customize the record serialization and deserialization. I’m also trying to ultimately understand from the maintainers the …

---

## [Hybrid query filter support in java client](https://forum.opensearch.org/t/hybrid-query-filter-support-in-java-client/27446)

<div class="topic-metadata">

**Author:** [@adrianahariuc](https://forum.opensearch.org/u/adrianahariuc)\
**Replies:** 2\
**Last updated:** [November 7, 2025, 1:26pm UTC](https://forum.opensearch.org/t/hybrid-query-filter-support-in-java-client/27446 "2025-11-07T13:26:50Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Opensearch 3.2.0 Describe the issue: I am trying to use the java client to create and execute a Hybrid query with a filter. This is currently supported as do…

---

## [Handing over JWT to OpenSearch in requests using Spring Data for OpenSearch](https://forum.opensearch.org/t/handing-over-jwt-to-opensearch-in-requests-using-spring-data-for-opensearch/27216)

<div class="topic-metadata">

**Author:** [@thomas.schuerger](https://forum.opensearch.org/u/thomas.schuerger)\
**Replies:** 0\
**Last updated:** [October 2, 2025, 4:12pm UTC](https://forum.opensearch.org/t/handing-over-jwt-to-opensearch-in-requests-using-spring-data-for-opensearch/27216 "2025-10-02T16:12:24Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 3.2.0, Spring Boot 3.4.x Describe the issue: I have a Spring Boot application where users authenticate with JWT using Spring Security. I want to …

---

## [Set up communication with external service in OpenSearch plugin](https://forum.opensearch.org/t/set-up-communication-with-external-service-in-opensearch-plugin/24497)

<div class="topic-metadata">

**Author:** [@oleksandrkalenskyy](https://forum.opensearch.org/u/oleksandrkalenskyy)\
**Replies:** 1\
**Last updated:** [May 23, 2025, 3:09pm UTC](https://forum.opensearch.org/t/set-up-communication-with-external-service-in-opensearch-plugin/24497 "2025-05-23T15:09:49Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch version 3.0.0 Describe the issue: Except communication with OpenSearch Dashboards and OpenSearch Cluster, I need my plugin to communicate with e…

---

## [How to configure the client in opensearch-java client library?](https://forum.opensearch.org/t/how-to-configure-the-client-in-opensearch-java-client-library/23713)

<div class="topic-metadata">

**Author:** [@sorrow](https://forum.opensearch.org/u/sorrow)\
**Replies:** 2\
**Last updated:** [March 14, 2025, 7:37pm UTC](https://forum.opensearch.org/t/how-to-configure-the-client-in-opensearch-java-client-library/23713 "2025-03-14T19:37:09Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): AWS OpenSearch 2.17 Describe the issue: I am trying to connect to an AWS Opensearch 2.17 from my ECS. I was using the Elasticsearch 6.6.0 client library p…

---

## [Memory issue - java client 2.14.0](https://forum.opensearch.org/t/memory-issue-java-client-2-14-0/22832)

<div class="topic-metadata">

**Author:** [@vgjk](https://forum.opensearch.org/u/vgjk)\
**Replies:** 13\
**Last updated:** [February 6, 2025, 9:31am UTC](https://forum.opensearch.org/t/memory-issue-java-client-2-14-0/22832 "2025-02-06T09:31:45Z")

</div>

java client 2.14 we are using open search java client 2.14.0 , we are observing that in heap memory the response are getting retained -org.opensearch.client.transport.httpclient5.internal.HeapBufferedAsyncEntityConsume…

---

## [Example using PIT for opensearch-java](https://forum.opensearch.org/t/example-using-pit-for-opensearch-java/23280)

<div class="topic-metadata">

**Author:** [@sunshine16](https://forum.opensearch.org/u/sunshine16)\
**Replies:** 3\
**Last updated:** [January 31, 2025, 9:28pm UTC](https://forum.opensearch.org/t/example-using-pit-for-opensearch-java/23280 "2025-01-31T21:28:43Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 2.11.1 Describe the issue: Trying to get pagination working for opensearch. Had it working with Elasticsearch but, have moved over to opensearch…

---

## [BukResponseItem not returning the source document back](https://forum.opensearch.org/t/bukresponseitem-not-returning-the-source-document-back/22503)

<div class="topic-metadata">

**Author:** [@pabrahamraju](https://forum.opensearch.org/u/pabrahamraju)\
**Replies:** 2\
**Last updated:** [November 22, 2024, 4:40am UTC](https://forum.opensearch.org/t/bukresponseitem-not-returning-the-source-document-back/22503 "2024-11-22T04:40:34Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch Version: 2.16.0 Java Client: 2.10.1 Describe the issue: My requirement is to fetch the source document back in the bulk response for each of th…

---

## [Is it possible to use both the RestHighLevelClient and OpenSearchClient with spring-data-opensearch?](https://forum.opensearch.org/t/is-it-possible-to-use-both-the-resthighlevelclient-and-opensearchclient-with-spring-data-opensearch/21956)

<div class="topic-metadata">

**Author:** [@aaronroh](https://forum.opensearch.org/u/aaronroh)\
**Replies:** 1\
**Last updated:** [October 15, 2024, 3:58pm UTC](https://forum.opensearch.org/t/is-it-possible-to-use-both-the-resthighlevelclient-and-opensearchclient-with-spring-data-opensearch/21956 "2024-10-15T15:58:49Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 2.11.0 opensearch-java:2.14.0 spring-data-opensearch:1.5.3 Describe the issue: My team is planning to migrate the ORHLC client to the OpenSear…

---

## [Issue with opensearch client](https://forum.opensearch.org/t/issue-with-opensearch-client/21409)

<div class="topic-metadata">

**Author:** [@gabinvallet](https://forum.opensearch.org/u/gabinvallet)\
**Replies:** 4\
**Last updated:** [September 12, 2024, 3:38pm UTC](https://forum.opensearch.org/t/issue-with-opensearch-client/21409 "2024-09-12T15:38:17Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Opensearch 2.14.0 opensearch-java 2.14.0 (but I’ve tried several versions, was 2.11.1 at first) opensearch-rest-client 2.16.0 (but I’ve tried several versi…

---

## [Generic Client with Custom Deserializer fails to deserialize aggregations](https://forum.opensearch.org/t/generic-client-with-custom-deserializer-fails-to-deserialize-aggregations/20739)

<div class="topic-metadata">

**Author:** [@deepak\_singhal](https://forum.opensearch.org/u/deepak_singhal)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 4:43am UTC](https://forum.opensearch.org/t/generic-client-with-custom-deserializer-fails-to-deserialize-aggregations/20739 "2024-08-13T04:43:31Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): I am using opensearch-java client 2.12.0 Describe the issue: I have a specific requirement where I will be using aggregations on a index, but I want to use…

---

## [Purpose of SearchResult's documents() API in the Java client](https://forum.opensearch.org/t/purpose-of-searchresults-documents-api-in-the-java-client/20681)

<div class="topic-metadata">

**Author:** [@swolehee](https://forum.opensearch.org/u/swolehee)\
**Replies:** 0\
**Last updated:** [August 5, 2024, 4:34pm UTC](https://forum.opensearch.org/t/purpose-of-searchresults-documents-api-in-the-java-client/20681 "2024-08-05T16:34:26Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.13.0 Describe the issue: It is not clear what the documents() API in the SearchResults does: SearchResult (java-client 2.13.0 API) The document does not …

---

## [Migrating custom search plugin from hlrc to java client](https://forum.opensearch.org/t/migrating-custom-search-plugin-from-hlrc-to-java-client/20630)

<div class="topic-metadata">

**Author:** [@silentduck](https://forum.opensearch.org/u/silentduck)\
**Replies:** 0\
**Last updated:** [July 31, 2024, 4:39pm UTC](https://forum.opensearch.org/t/migrating-custom-search-plugin-from-hlrc-to-java-client/20630 "2024-07-31T16:39:38Z")

</div>

Versions (relevant - OpenSearch/): OpenSearch 2.13.0 Describe the issue: We are using HLRC and extending the search capabilities at runtime with our custom search plugin with something like this List\<SearchPlugin\> cus…

---

## [Java Client Query Param for "search\_pipeline", Hybrid Neural Search](https://forum.opensearch.org/t/java-client-query-param-for-search-pipeline-hybrid-neural-search/19070)

<div class="topic-metadata">

**Author:** [@jdomkline](https://forum.opensearch.org/u/jdomkline)\
**Replies:** 4\
**Last updated:** [July 29, 2024, 10:50pm UTC](https://forum.opensearch.org/t/java-client-query-param-for-search-pipeline-hybrid-neural-search/19070 "2024-07-29T22:50:52Z")

</div>

deleted please disregard

---

## [Using Opensearch kNN in Java](https://forum.opensearch.org/t/using-opensearch-knn-in-java/20520)

<div class="topic-metadata">

**Author:** [@safakkbilici](https://forum.opensearch.org/u/safakkbilici)\
**Replies:** 2\
**Last updated:** [July 26, 2024, 1:56pm UTC](https://forum.opensearch.org/t/using-opensearch-knn-in-java/20520 "2024-07-26T13:56:22Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Java 17, Gradle 8.4, OpenSearch 2.15, OpenSearch kNN 2.15 Describe the issue: Hi everyone, I want to use kNN plugin of OpenSearch in its Java client, howev…

---

## [Sort: FieldSort not implement SortOptionsVariant](https://forum.opensearch.org/t/sort-fieldsort-not-implement-sortoptionsvariant/20344)

<div class="topic-metadata">

**Author:** [@Brun](https://forum.opensearch.org/u/Brun)\
**Replies:** 2\
**Last updated:** [July 17, 2024, 1:29pm UTC](https://forum.opensearch.org/t/sort-fieldsort-not-implement-sortoptionsvariant/20344 "2024-07-17T13:29:39Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): opensearch-java:2.10.4 Describe the issue: When we want to sort a request, FieldSort doesn’t implement SortOptionVariant, so we cannot use it in SearchRequ…

---

## [Nested Document Searches](https://forum.opensearch.org/t/nested-document-searches/19734)

<div class="topic-metadata">

**Author:** [@gludington](https://forum.opensearch.org/u/gludington)\
**Replies:** 0\
**Last updated:** [June 7, 2024, 11:35pm UTC](https://forum.opensearch.org/t/nested-document-searches/19734 "2024-06-07T23:35:40Z")

</div>

Describe the issue: Attempting to move to the java client libraries using the various builders, and I am not understanding the use of the nested query builder. In pure JSON, my query looks in part something like this, …

---

## [How to get statusCode from SearchResponse in Java Client](https://forum.opensearch.org/t/how-to-get-statuscode-from-searchresponse-in-java-client/19660)

<div class="topic-metadata">

**Author:** [@dishatkr](https://forum.opensearch.org/u/dishatkr)\
**Replies:** 0\
**Last updated:** [May 31, 2024, 6:46pm UTC](https://forum.opensearch.org/t/how-to-get-statuscode-from-searchresponse-in-java-client/19660 "2024-05-31T18:46:44Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.5 Describe the issue: I’m moving from restHighLevelClient to Openserach java Client V2.5 In the SearchResponse of RestHighLevelClient, there is a method…

---

## [Get Document APIs throw incorrect method error](https://forum.opensearch.org/t/get-document-apis-throw-incorrect-method-error/19278)

<div class="topic-metadata">

**Author:** [@danngyn](https://forum.opensearch.org/u/danngyn)\
**Replies:** 9\
**Last updated:** [May 28, 2024, 4:27am UTC](https://forum.opensearch.org/t/get-document-apis-throw-incorrect-method-error/19278 "2024-05-28T04:27:11Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): opensearchproject/opensearch:2.13.0 org.opensearch.client:opensearch-java:2.6.0 org.opensearch.client:opensearch-rest-client:2.13.0 Describe the issue: Ope…

---

## [Poolsize for java client](https://forum.opensearch.org/t/poolsize-for-java-client/19376)

<div class="topic-metadata">

**Author:** [@shaiktas](https://forum.opensearch.org/u/shaiktas)\
**Replies:** 6\
**Last updated:** [May 21, 2024, 12:25pm UTC](https://forum.opensearch.org/t/poolsize-for-java-client/19376 "2024-05-21T12:25:26Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): Describe the issue: We have OpenSearch Client API in python to accept pool\_maxsize=500 while creating OpenSerchClient, Same how to provide for JAVA client ?…

---

## [How to retrieve stored fields using spring-data-opensearch with \_source disabled?](https://forum.opensearch.org/t/how-to-retrieve-stored-fields-using-spring-data-opensearch-with-source-disabled/19314)

<div class="topic-metadata">

**Author:** [@tuk](https://forum.opensearch.org/u/tuk)\
**Replies:** 1\
**Last updated:** [May 12, 2024, 5:28am UTC](https://forum.opensearch.org/t/how-to-retrieve-stored-fields-using-spring-data-opensearch-with-source-disabled/19314 "2024-05-12T05:28:49Z")

</div>

I have an index template like below { "index\_patterns": \[ "request\_response-\*" \], "template": { "settings": { "number\_of\_shards": 1, "index": { "codec": "best\_compression" } }…

---

## [Signing request with Apache HttpClient 5 Transport](https://forum.opensearch.org/t/signing-request-with-apache-httpclient-5-transport/18333)

<div class="topic-metadata">

**Author:** [@opensearchlearner](https://forum.opensearch.org/u/opensearchlearner)\
**Replies:** 5\
**Last updated:** [March 12, 2024, 2:43pm UTC](https://forum.opensearch.org/t/signing-request-with-apache-httpclient-5-transport/18333 "2024-03-12T14:43:47Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): opensearch java client 2.8.1 Describe the issue: Is there an easy way to sign the request when using Apache HttpClient 5 Transport? Is there an existing e…

---

## [AwsSdk2Transport, disable SSL and add interceptors](https://forum.opensearch.org/t/awssdk2transport-disable-ssl-and-add-interceptors/18330)

<div class="topic-metadata">

**Author:** [@opensearchlearner](https://forum.opensearch.org/u/opensearchlearner)\
**Replies:** 0\
**Last updated:** [March 11, 2024, 7:14am UTC](https://forum.opensearch.org/t/awssdk2transport-disable-ssl-and-add-interceptors/18330 "2024-03-11T07:14:02Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): opensearch-java:2.8.1 Describe the issue: I am trying to use AwsSdk2Transport to connect to open search service. I have 2 questions: When I deploy my app…

---

## [Authentication error handling with Java client on HttpClient5 transport](https://forum.opensearch.org/t/authentication-error-handling-with-java-client-on-httpclient5-transport/18261)

<div class="topic-metadata">

**Author:** [@jeecha](https://forum.opensearch.org/u/jeecha)\
**Replies:** 1\
**Last updated:** [March 8, 2024, 10:00pm UTC](https://forum.opensearch.org/t/authentication-error-handling-with-java-client-on-httpclient5-transport/18261 "2024-03-08T22:00:49Z")

</div>

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): OpenSearch 2.11.1 OpenSearch Java client 2.9.0 Java 17 Describe the issue: When issuing a request with invalid authentication credentials and server resp…

[Next page](https://forum.opensearch.org/tag/opensearch-java/4.md?match_all_tags=true&page=1&tags%5B%5D=opensearch-java)
