Elasticsearch Curl Commands Curl Command for counting number of documents in the cluster

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

curl -XGET 'http://www.example.com:9200/myIndexName/_count?pretty'

Output:

{
  "count" : 90,
  "_shards" : {
    "total" : 6,
    "successful" : 6,
    "failed" : 0
  }
}

The index has 90 documents within it.

Reference Link: Here



Got any Elasticsearch Question?