OpenSearch SDK for Java encapsulates API operations for data processing and searching. For other management operations, use Management and Control SDKs.
Add the following Maven dependency to use the latest SDK version:
<dependency>
<groupId>com.aliyun.opensearch</groupId>
<artifactId>aliyun-sdk-opensearch</artifactId>
<version>4.0.0</version>
</dependency>Compatibility
V3.1.3 differs significantly from V2.1.x. V2.1.x does not support standard applications.
V3.1.3 and later support both advanced and standard applications.
Cross-application queries are supported.
In V3.1.3, sorting is not supported for scroll queries.
Version history
V4.0.0 (2021-09-13)
Added
Added the
ReSearch::DISABLEparameter for the drop-down suggestion feature.
Fixed
Corrected the URI for the drop-down suggestion feature.
V3.9.0 (2021-08-10)
Added
Added the
pushmethod to theDocumentClientclass to support documents in theJSONArrayformat.
V3.8.0 (2021-08-02)
Added
Added the
com.aliyun.opensearch.tracer.ClientTraceroperation.
V3.7.0 (2021-05-11)
Changed
Discontinued management operations for OpenSearch V3.
V3.6.0 (2020-09-23)
Added
Added support for the
FinalDistinctclause.Added support for clauses in custom queries.
V3.5.1 (2020-04-24)
Added
Added support for Temporary Security Token Service (STS) tokens.
Added the
Rank.secondRankTypeparameter for the search feature. Valid values:EXPRESSIONandCAVA_SCRIPT.Added the
userIdandreSearchparameters for the drop-down suggestion feature. ThereSearchparameter acceptsHOMONYM.Added the
SuggestParamsclass and theexecutemethod for the drop-down suggestion feature.
Fixed
Fixed an error caused by an invalid parameter for the number of drop-down suggestions.
Corrected the
reSearchparameter value fromHOMONYtoHOMONYM.
V3.5.0 (2020-04-14)
Added
Added support for STS tokens.
Added the
Rank.secondRankTypeparameter for the search feature. Valid values:EXPRESSIONandCAVA_SCRIPT.Added the
userIdandreSearchparameters for the drop-down suggestion feature. ThereSearchparameter can be set toHOMONY.Added the
SuggestParamsclass and theexecutemethod for the drop-down suggestion feature.
V3.4.1 (2019-09-17)
Added
Added HTTPS support.
V3.4.0 (2019-08-23)
Added
Added HTTPS support.
V3.3.0 (2018-09-03)
<dependency>
<groupId>com.aliyun.opensearch</groupId>
<artifactId>aliyun-sdk-opensearch</artifactId>
<version>3.3.0</version>
</dependency>V3.2.0 (2018-06-07)
<dependency>
<groupId>com.aliyun.opensearch</groupId>
<artifactId>aliyun-sdk-opensearch</artifactId>
<version>3.2.0</version>
</dependency>Added
Scroll queries now support sorting by a single field of the
inttype.Added the
switchTomethod to theAppClientclass to switch versions across multiple applications at once.Added support for cross-application queries.
Added support for querying and updating application quotas by application name or ID.
Added support for modifying billing models and quotas, including specifications, storage capacity, and computing resources.
Updated the drop-down suggestion feature.
Fixed
Fixed a connection pool exhaustion issue. When a response arrived in GZIP format and the request was not explicitly closed, the connection remained occupied instead of returning to the pool. This caused the pool to run out of connections and the SDK to stop responding. Requests are now closed after the response is received.
V3.1.3 (2017-04-14)
<dependency>
<groupId>com.aliyun.opensearch</groupId>
<artifactId>aliyun-sdk-opensearch</artifactId>
<version>3.1.3</version>
</dependency>Added
Added support for the
FULLJSONformat.
Changed
Relocated all third-party dependencies into the OpenSearch package to reduce conflicts with official dependencies. The
slf4j-apicomponent is excluded from relocation.The
commitmethod now removes documents from the SDK client buffer regardless of whether the call succeeds. This reduces ambiguity when using the SDK or calling API operations.