# Difference between docs stored and indexed

**URL:** https://discuss.elastic.co/t/difference-between-docs-stored-and-indexed/9868
**Category:** Elasticsearch
**Created:** [November 28, 2012, 5:01pm UTC](https://discuss.elastic.co/t/difference-between-docs-stored-and-indexed/9868 "2012-11-28T17:01:16Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Konstantin\_Krauss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/konstantin_krauss/32/2602_2.png) [@Konstantin\_Krauss](https://discuss.elastic.co/u/Konstantin_Krauss)
#### Post date: [November 28, 2012, 5:01pm UTC](https://discuss.elastic.co/t/difference-between-docs-stored-and-indexed/9868/1 "2012-11-28T17:01:16Z")

</div>

Hi,

looking at my \_stats I can find the following informations:

\_all: {  
primaries: {  
docs: {  
count: 8617,  
deleted: 47  
},  
indexing: {  
index\_total: 9017,  
index\_time: "2.3s",  
index\_time\_in\_millis: 2308,  
index\_current: 0,  
delete\_total: 0,  
delete\_time: "0s",  
delete\_time\_in\_millis: 0,  
delete\_current: 0

In my database I have 9017 objects like the value for indexing.index\_total  
So what does this difference of 400 docs to docs.count mean? I cannot find  
them in my search results or facet searches. Was there a problem during the  
import? Should I recreate the index? Where can I find additional  
information?

Thanks,  
Konstantin

--

---

<div class="post-metadata">

### Author: ![radu\_gheorghe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/radu_gheorghe/32/556_2.png) [@radu\_gheorghe](https://discuss.elastic.co/u/radu_gheorghe)
#### Post date: [November 28, 2012, 5:13pm UTC](https://discuss.elastic.co/t/difference-between-docs-stored-and-indexed/9868/2 "2012-11-28T17:13:30Z")

</div>

Hello Konstantin,

If you index two documents with the same ID, they will be counted twice in  
"index\_total" and only once in docs count. That's because you indexed two  
docs and only have one stored.

Also, if you delete the document, you'll end up with 0 docs, but still 2 in  
index\_total.

## Best regards, Radu

[http://sematext.com/](http://sematext.com/) -- Elasticsearch -- Solr -- Lucene

On Wed, Nov 28, 2012 at 7:01 PM, Konstantin Krauss \<  
[konstantin@propertybase.com](mailto:konstantin@propertybase.com)\> wrote:

> Hi,
> 
> looking at my \_stats I can find the following informations:
> 
> \_all: {  
> primaries: {  
> docs: {  
> count: 8617,  
> deleted: 47  
> },  
> indexing: {  
> index\_total: 9017,  
> index\_time: "2.3s",  
> index\_time\_in\_millis: 2308,  
> index\_current: 0,  
> delete\_total: 0,  
> delete\_time: "0s",  
> delete\_time\_in\_millis: 0,  
> delete\_current: 0
> 
> In my database I have 9017 objects like the value for indexing.index\_total  
> So what does this difference of 400 docs to docs.count mean? I cannot find  
> them in my search results or facet searches. Was there a problem during the  
> import? Should I recreate the index? Where can I find additional  
> information?
> 
> Thanks,  
> Konstantin

--

---

<div class="post-metadata">

### Author: ![Konstantin\_Krauss](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/konstantin_krauss/32/2602_2.png) [@Konstantin\_Krauss](https://discuss.elastic.co/u/Konstantin_Krauss)
#### Post date: [November 28, 2012, 5:21pm UTC](https://discuss.elastic.co/t/difference-between-docs-stored-and-indexed/9868/3 "2012-11-28T17:21:35Z")

</div>

Hi Radu,

thanks for the explanation. This makes "index\_total" much clearer.  
So I have to investigate, why some docs are getting deleted. Duplicate IDs  
cannot be the case, because I take the IDs from my database and the index  
was new.

Best,  
Konstantin

--

---

<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: [July 6, 2017, 3:02am UTC](https://discuss.elastic.co/t/difference-between-docs-stored-and-indexed/9868/4 "2017-07-06T03:02:25Z")

</div>


