All Products
Search
Document Center

OpenSearch:Java SDK (query/push)

Last Updated:Dec 08, 2025

This topic provides version and download information for the Java SDK for OpenSearch Industry Algorithm Edition.

Version guide

The Java SDK encapsulates API operations for data processing and search. To use other features, you must use the management and control SDK.

<dependency>
    <groupId>com.aliyun.opensearch</groupId>
    <artifactId>aliyun-sdk-opensearch</artifactId>
    <version>6.2.1</version>
</dependency>

Compatibility

  • SDK version 3.1.3 is significantly different from the 2.1.x versions. Versions in the 2.1.x series do not support access to Standard Edition applications.

  • SDK versions 3.1.3 and later support both Premium Edition and Standard Edition applications.

  • Supports multi-application queries.

  • In version 3.1.3, the scroll method does not support sorting.

Update log

V6.2.1 (2025-07-22)

Upgraded the org.json dependency to version 20250517.

V6.2.0 (2025-02-21)

Added support for chat queries.

V6.1.0 (2024-08-16)

Added support for Bearer Token access.

V6.0.1 (2024-01-18)

  • Fixed a potential "Socket Closed" error that occurred when the response status code is in the 4xx or 5xx range.

  • You can now pass an HttpClientManager instance when you build an OpenSearchClient.

V6.0.0 (2023-11-20)

  • Added support for the Credential Provider SDK.

  • You can now retrieve the original HttpResponse object after a request.

  • Added support for Server-Sent Events (SSE).

V5.1.0 (2023-09-15)

Added support for passing parameters and authentication through query strings for non-GET methods.

V5.0.0 (2022-12-02)

Each OpenSearchClient instance now has its own HttpClientManager instance instead of sharing one.

V4.0.0 (2021-09-13)

  • Added the ReSearch::DISABLE parameter for the drop-down suggestion feature.

  • Corrected the URI for the drop-down suggestion feature.

V3.9.0 (2021-08-10)

Added an overloaded DocumentClient.push method to support passing documents in a JSONArray.

V3.8.0 (2021-08-02)

Added the com.aliyun.opensearch.tracer.ClientTracer request monitoring interface.

V3.7.0 (2021-05-11)

Deprecated V3 management and control API requests.

V3.6.0 (2020-09-23)

  • Added support for the FinalDistinct clause.

  • Added support for custom query clauses.

V3.5.1 Java SDK (2020-04-24)

  • Added support for Security Token Service (STS) temporary tokens.

  • Added the Rank.secondRankType search parameter. The valid values are EXPRESSION and CAVA_SCRIPT.

  • Added the userId and reSearch parameters for the drop-down suggestion feature. The reSearch parameter can be set to HOMONYM.

  • Added the SuggestParams class and the execute method for the drop-down suggestion feature.

  • Fixed a bug where the parameter for the number of drop-down suggestions was invalid.

  • Corrected the value of the reSearch parameter for the drop-down suggestion feature from HOMONY to HOMONYM.

V3.5.0 (2020-04-14)

  • Added support for STS temporary tokens.

  • Added the Rank.secondRankType search parameter. The valid values are EXPRESSION and CAVA_SCRIPT.

  • Added the userId and reSearch parameters for the drop-down suggestion feature. The reSearch parameter can be set to HOMONY.

  • Added the SuggestParams class and the execute method for the drop-down suggestion feature.

V3.4.1 Java SDK (2019-09-17)

  • Added support for Data Collection 2.0.

  • Added support for HTTPS.

  • Fixed a parameter passing issue for A/B tests.

V3.4.0 (2019-08-23)

  • Data Collection 2.0

  • Added support for HTTPS.

V3.3.0 Java SDK (2018-09-03)

  • Added support for A/B tests.

  • Added support for behavioral data collection.

  • Maven repository address

    <dependency>
      <groupId>com.aliyun.opensearch</groupId>
      <artifactId>aliyun-sdk-opensearch</artifactId>
      <version>3.3.0</version>
    </dependency>
  • New features

    Added support for A/B tests.

    Added support for behavioral data collection.

V3.2.0 Java SDK (2018-06-07)

  • Maven repository URL

    <dependency>
      <groupId>com.aliyun.opensearch</groupId>
      <artifactId>aliyun-sdk-opensearch</artifactId>
      <version>3.2.0</version>
    </dependency>
  • Added support for the drop-down suggestion feature.

  • New features

    • The scroll method supports sorting based on a single field of the int type.

    • The AppClient class now supports the switchTo method, which lets you switch the versions of multiple applications in a batch operation.

    • Added support for multi-application searches.

    • You can now retrieve or update the quota of an application based on its name or ID.

    • Added support for modifying application quotas for the new billing model. This includes billing specifications, storage capacity, and computing resources.

    • Added support for the new drop-down suggestion feature.

  • Bug fixes

    Fixed an issue where connections were not returned to the connection pool if a GZIP stream response was not closed. This issue could cause the connection pool to become full and the SDK to hang.

V3.1.3 Java SDK (2017-04-14)

  • Maven repository address

    <dependency>
      <groupId>com.aliyun.opensearch</groupId>
      <artifactId>aliyun-sdk-opensearch</artifactId>
      <version>3.1.3</version>
    </dependency>
  • To reduce dependency conflicts, third-party dependencies were moved into the opensearch package. All dependencies, except for the slf4j-api component, are now relocated to the opensearch package.

  • Added support for the FULLJSON format.

  • Documents are now cleared from the buffer after a commit, regardless of whether the commit succeeds or fails. This change reduces ambiguity when you use the SDK API.

  • The components for the suggest (drop-down suggestion) feature are now online, making the feature available in the SDK.