# Docs Count Different between Elasticsearch index and CouchDB

**URL:** <https://discuss.elastic.co/t/docs-count-different-between-elasticsearch-index-and-couchdb/5856>\
**Category:** Elasticsearch\
**Created:** [November 12, 2011, 1:42am UTC](https://discuss.elastic.co/t/docs-count-different-between-elasticsearch-index-and-couchdb/5856 "2011-11-12T01:42:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbattle](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jbattle](https://discuss.elastic.co/u/jbattle)\
**Post date:** [November 12, 2011, 1:42am UTC](https://discuss.elastic.co/t/docs-count-different-between-elasticsearch-index-and-couchdb/5856/1 "2011-11-12T01:42:19Z")

</div>

I'm using the CouchDB river and when I make the connection and check  
the stats API for this particular index, the number of docs returned  
shows a different count value than my CouchDB. The strange thing is  
that there is a value for deleted despite me just creating the  
connection. Also, the sum of the count + deleted equals the number of  
docs in my Couch instance.

Any idea what could be causing this?

Thanks

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 13, 2011, 9:51am UTC](https://discuss.elastic.co/t/docs-count-different-between-elasticsearch-index-and-couchdb/5856/2 "2011-11-13T09:51:54Z")

</div>

Maybe the same doc id is being indexed?

On Sat, Nov 12, 2011 at 3:42 AM, jbattle [jbattle@gmail.com](mailto:jbattle@gmail.com) wrote:

> I'm using the CouchDB river and when I make the connection and check  
> the stats API for this particular index, the number of docs returned  
> shows a different count value than my CouchDB. The strange thing is  
> that there is a value for deleted despite me just creating the  
> connection. Also, the sum of the count + deleted equals the number of  
> docs in my Couch instance.
> 
> Any idea what could be causing this?
> 
> Thanks

---

<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:48am UTC](https://discuss.elastic.co/t/docs-count-different-between-elasticsearch-index-and-couchdb/5856/3 "2017-07-06T03:48:52Z")

</div>

Closed on July 6, 2017, 3:48am UTC


