All Products
Search
Document Center

OpenSearch:SDK clients

Last Updated:Oct 24, 2025

This topic describes SDK clients and related FAQ.

Overview

  • 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 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);