# How to push large excel data to elasticsearch using bulk API

**URL:** <https://discuss.elastic.co/t/how-to-push-large-excel-data-to-elasticsearch-using-bulk-api/101266>\
**Category:** Elasticsearch\
**Created:** [September 21, 2017, 6:05am UTC](https://discuss.elastic.co/t/how-to-push-large-excel-data-to-elasticsearch-using-bulk-api/101266 "2017-09-21T06:05:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 21, 2017, 7:16am UTC](https://discuss.elastic.co/t/how-to-push-large-excel-data-to-elasticsearch-using-bulk-api/101266/2 "2017-09-21T07:16:50Z")

</div>

Is it somehow the same thread as:

- [How to read excel file and push data into elasticsearch](https://discuss.elastic.co/t/how-to-read-excel-file-and-push-data-into-elasticsearch/100644)
- [Read Excel File and Push All Data To Elasticsearch](https://discuss.elastic.co/t/read-excel-file-and-push-all-data-to-elasticsearch/101131)

?

I'd suggest keeping the discussion in only one thread instead so we can follow or at least link to the previous post if this one is closed.

If it's totally something different then having a new question is fine.

BTW could you please format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

May be 50000 items is too much per bulk operation?  
You can try to run a bulk API call every 5000 docs for example.

Have a look at [https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-document-bulk.html#java-rest-high-document-bulk-processor](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/current/java-rest-high-document-bulk.html#java-rest-high-document-bulk-processor)

This will simplify a lot your code IMO.

BTW `system.out` might slow down a lot your code.

---

_[View the full topic](https://discuss.elastic.co/t/how-to-push-large-excel-data-to-elasticsearch-using-bulk-api/101266)._
