In the Overview tab of my ElasticSearch head it shows the following:
stock size: 2.2gb (2.2gb) docs: 1062049 (1598589)
Can someone tell me what the 2 docs numbers 1062049 and 1598589 mean?
You can use the search API to search and aggregate data stored in Elasticsearch data streams or indices. The API's query request body parameter accepts queries written in Query DSL. The following request searches my-index-000001 using a match query. This query matches documents with a user.id value of kimchy .
The first number is num_docs
, the second number is max_docs
. Both are provided by the Index Status API
num_docs
is simple: it is the number of documents living inside your index at this momentmax_docs
is a bit more nebulous, I believe it is the max docs your index has seen before a merge removed the deleted docs. It also includes nested documents, which internally are a new doc but appear as a single doc to the end-userThe value without brackets shows us sum of sizes of primary shards.
The value inside brackets shows us sum of sizes of primary shards + sum of sizes of replica shards.
In your case, you've only 1 primary shard and 0 replica shards. So, it shows you index size 2.2 GB (2.2 GB).
Similar convention is followed for the document count.
I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With