elasticsearch - Curl command for counting number of documents in the cluster in elasticsearch - elastic - elastic search - elasticsearch tutorial - elasticsearch docker
curl command for counting number of documents in the cluster
curl -XGET 'http://www.example.com:9200/myIndexName/_count?pretty'
Clicking "Copy Code" button will copy the code into the clipboard - memory. Please paste(Ctrl+V) it in your destination. The code will get pasted. Happy coding from Wikitechy - elasticsearch - elasticsearch tutorial - elastic - elastic search - elasticsearch docker team
Output:
{
"count" : 90,
"_shards" : {
"total" : 6,
"successful" : 6,
"failed" : 0
}
}The index has 90 documents within it.