# Docs.count is diffenet when I twice post data to elasticsearch

**URL:** <https://discuss.elastic.co/t/docs-count-is-diffenet-when-i-twice-post-data-to-elasticsearch/199056>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [September 11, 2019, 10:12am UTC](https://discuss.elastic.co/t/docs-count-is-diffenet-when-i-twice-post-data-to-elasticsearch/199056 "2019-09-11T10:12:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiddingl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kiddingl/32/104644_2.png) [@kiddingl](https://discuss.elastic.co/u/kiddingl)\
**Post date:** [September 11, 2019, 10:12am UTC](https://discuss.elastic.co/t/docs-count-is-diffenet-when-i-twice-post-data-to-elasticsearch/199056/1 "2019-09-11T10:12:42Z")

</div>

elaticsearch: 6.3.1  
os: centos7  
kernel: 3.10

### I run the shell command:

```auto
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9202/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json

```

### The end of command resaults

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/09ebc85aabbb208c4f736adc4513fa5fe6386169.png)

About 111396 documents was stored into elasticsearch

### Run the shell command and observed docs.count

```auto
curl -XGET 127.0.0.1:9201/_cat/indices?v

```

### The resault of command through \_cat API:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/8/18c8d4dd2e9b581f3f1d19b7319e1e2a3f2c4dcf.png)  
docs.count is 111395, I don't know why lost one

### Execute top command again

```auto
curl -H 'Content-Type: application/x-ndjson' -XPOST 'localhost:9202/shakespeare/doc/_bulk?pretty' --data-binary @shakespeare_6.0.json

```

### The end of command resaults

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/1/91f93c107a61635968816318e06a66200eea1d78.png)  
No problem

### The resault of command through \_cat API

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/4/24260f478713127bd8005580eb954a4974ad6ba2.png)  
docs.count is 111396 which is right, I am confused , I don't known why command is excuted twice?

---

<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:** [October 9, 2019, 10:12am UTC](https://discuss.elastic.co/t/docs-count-is-diffenet-when-i-twice-post-data-to-elasticsearch/199056/2 "2019-10-09T10:12:44Z")

</div>

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