# Extra documents in Elastic Search

**URL:** <https://discuss.elastic.co/t/extra-documents-in-elastic-search/17155>\
**Category:** Elasticsearch\
**Created:** [April 23, 2014, 9:13pm UTC](https://discuss.elastic.co/t/extra-documents-in-elastic-search/17155 "2014-04-23T21:13:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Napoleon\_T](https://avatars.discourse-cdn.com/v4/letter/n/e5b9ba/32.png) [@Napoleon\_T](https://discuss.elastic.co/u/Napoleon_T)\
**Post date:** [April 23, 2014, 9:13pm UTC](https://discuss.elastic.co/t/extra-documents-in-elastic-search/17155/1 "2014-04-23T21:13:28Z")

</div>

Hi,

I'm trying to store a lot of documents into ES using pig. The pig job ends  
successfully but I end up with more documents in Elasticsearch than the  
number of rows in my input.  
My pig script is 3 lines:  
REGISTER 'local/path/to/m2.jar'  
data = load 'path/to/hdfs/file.tsv' as (field1: chararray, field2: long,  
field3: long, field4: long)  
store data into 'index/type' using  
org.elasticsearch.hadoop.pig.EsStorage('[es.nodes=node2.domain.com](http://es.nodes=node2.domain.com)',  
'es.rersource=index/type');

I have speculative execution disabled for map and reduce when running this  
pig script.

Hadoop states that 54,723,557 records were written (console output and job  
tracker UI).  
ES head plugin claims that I have docs: 57,344,987 (57,344,987).

My environment:  
hadoop: 1.2.1 with 6 nodes cluster  
elasticsearch: 1.0.0. 6 node cluster. Different than hadoop nodes.  
elasticsearch-hadoop version M2.  
Pig version: 0.12.0

Any ideas of what is going on here?

Thanks.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/eec8a0da-be72-46e0-8358-edca94f077f3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/eec8a0da-be72-46e0-8358-edca94f077f3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:33am UTC](https://discuss.elastic.co/t/extra-documents-in-elastic-search/17155/2 "2017-07-06T01:33:56Z")

</div>


