This topic provides answers to commonly asked questions about the Java API operations of Alibaba Cloud Elasticsearch.

When I use Transport Client to access an Elasticsearch cluster, how do I set the cluster.name parameter?

Set this parameter to the ID of your cluster. You can obtain the ID from the Basic Information page of your cluster. For more information, see View basic information of a cluster.

When I use Transport Client to access an Elasticsearch cluster, the system displays the "NoNodeAvailableException" error message. What do I do?

The error message returned because Transport Client 5.5 or 5.6 is used. We recommend that you use Transport Client 5.3.3 to access an Elasticsearch cluster. Transport Client can be used to access only Elasticsearch V5.5 or V5.6 clusters. When you use Transport Client, set the client.transport.sniff parameter to false. For more information, see Transport Client (5.x).
Notice Transport Client falls into disuse in open source Elasticsearch 7.0 and is no longer available in open source Elasticsearch 8.0. Therefore, we recommend that you use Java REST Client. For more information, see High Level REST Client (6.3.x), High Level REST Client (6.7.x), and Low Level REST Client (5.x).