I am able to add a document to an index using curl.
But trying to add document using java api gives below error
Primary shard is not active or isn't assigned to a known node. Timeout: [1m],
Here is my client code
Node node = nodeBuilder().clusterName("pzap").client(true).node()
Client client = node.client()
I have tried without client(true) but it gives same error.
I would also check if your client is actually connected to your cluster. Is your cluster running on localhost? Does it use the default port 9300. Is the cluster name right?
You could try the cluster health from the client perspective:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.