Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do these numbers mean in ElasticSearch head?

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?

like image 585
cognito Avatar asked Mar 18 '13 17:03

cognito


People also ask

How does Elasticsearch index read data?

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 .


2 Answers

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 moment
  • max_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-user
like image 159
Zach Avatar answered Sep 21 '22 16:09

Zach


The 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.

like image 22
Harshit Avatar answered Sep 20 '22 16:09

Harshit