SDK clients
Updated at:
OpenSearch provides SDK clients for uploading documents and sending query requests. This topic also covers common SDK errors and solutions.
Overview
-
The DocumentClient class uploads documents. For more information, see DocumentClient class.
-
The OpenSearch class creates OpenSearchClient objects. For more information, see OpenSearch class.
-
The OpenSearchClient class creates SearcherClient objects. For more information, see OpenSearchClient class.
-
The SearcherClient class sends query requests. For more information, see SearcherClient class.
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.
To adjust the connection pool capacity, use the following sample code:
import com.aliyun.opensearch.util.HttpClientManager;
// ...
HttpClientManager.setMaxConnections(100);
Is this page helpful?