All Products
Search
Document Center

OpenSearch:SDK client

Last Updated:Oct 24, 2025

This topic describes the SDK client features and FAQ about OpenSearch SDK for Java.

Features

  • The DocumentClient class is used to upload documents. For more information, see DocumentClient.

  • The OpenSearch class is used to create OpenSearchClient objects. For more information, see OpenSearch.

  • The OpenSearchClient class is used to create SearcherClient objects. For more information, see OpenSearchClient.

  • The SearcherClient class is used by clients to send query requests. For more information, see SearcherClient.

FAQ about OpenSearch SDK for Java

Timeout waiting for connection from pool

Error:

com.aliyun.opensearch.sdk.dependencies.org.apache.http.conn.ConnectionPoolTimeoutException:
Timeout waiting for connection from pool

Description: The default capacity of the connection pool in OpenSearch SDK for Java is 50 connections.

You can use the following sample code to adjust the capacity of the connection pool:

import com.aliyun.opensearch.util.HttpClientManager;

// ...

HttpClientManager.setMaxConnections(100);