# Docs Count vs Index\_total

**URL:** https://discuss.elastic.co/t/docs-count-vs-index-total/113511
**Category:** Elasticsearch
**Created:** [December 28, 2017, 10:13pm UTC](https://discuss.elastic.co/t/docs-count-vs-index-total/113511 "2017-12-28T22:13:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jonessmithville](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jonessmithville/32/26067_2.png) [@jonessmithville](https://discuss.elastic.co/u/jonessmithville)
#### Post date: [December 28, 2017, 10:13pm UTC](https://discuss.elastic.co/t/docs-count-vs-index-total/113511/1 "2017-12-28T22:13:21Z")

</div>

I am trying to find a way to determine how fast or if all documents are getting indexed timely. I checked the previous days index ---

GET indexname-2017.12.27/\_stats

and noticed that

docs": {  
"count": 19695896,

Is much higher than  
"index\_total": 11819794,  
(no deletes)  
It seems then there are ~8m docs that didn't get indexed. Anything I am missing anything here?

---

<div class="post-metadata">

### Author: ![luiz.santos](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luiz.santos/32/24664_2.png) [@luiz.santos](https://discuss.elastic.co/u/luiz.santos)
#### Post date: [January 2, 2018, 5:36pm UTC](https://discuss.elastic.co/t/docs-count-vs-index-total/113511/2 "2018-01-02T17:36:24Z")

</div>

Hi @jonessmithville,

The `doc.count` represents the number of documents indexed in your index while `index_total` stands for number of indexing operations performed during elasticsearch uptime.

So if you update a document it will count as an indexing operation but your doc.count won't increase. Please, look at this example where I indexed 2 documents and updated 2 documents:

```
POST likes/doc/_bulk
{"index":{"_id": 1}}
{"likes": 10, "user": "john", "message": "elastic"}
{"index":{"_id": 2}}
{"likes": 20, "user": "john", "message": "elastic"}
{"index":{"_id": 1}}
{"likes": 5, "user": "ryan", "message": "elastic"}
{"index":{"_id": 2}}
{"likes": 10, "user": "ryan", "message": "elastic"}

```

We will observe`doc.count = 2` and `index_total = 4`:

```
GET likes/_stats?human

{
  "_shards": {
    "total": 10,
    "successful": 5,
    "failed": 0
  },
  "_all": {
    "primaries": {
      "docs": {
        "count": 2,
        "deleted": 2
      },
      "store": {
        "size": "9.3kb",
        "size_in_bytes": 9544
      },
      "indexing": {
        "index_total": 4,
      ...
}

```

Hope it helps.

Cheers,  
LG

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [January 30, 2018, 5:36pm UTC](https://discuss.elastic.co/t/docs-count-vs-index-total/113511/3 "2018-01-30T17:36:42Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
