# Delete All and multiple bulk puts

**URL:** <https://discuss.elastic.co/t/delete-all-and-multiple-bulk-puts/293756>\
**Category:** Elasticsearch\
**Created:** [January 7, 2022, 3:00pm UTC](https://discuss.elastic.co/t/delete-all-and-multiple-bulk-puts/293756 "2022-01-07T15:00:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snoopy20](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@snoopy20](https://discuss.elastic.co/u/snoopy20)\
**Post date:** [January 7, 2022, 3:00pm UTC](https://discuss.elastic.co/t/delete-all-and-multiple-bulk-puts/293756/1 "2022-01-07T15:00:31Z")

</div>

Hi All,

New user here and I've come across my first issue which the documentation doesn't seem to cater for.

I have a need to index about 35,000 small records which I intend to do through /indexName/\_bulk. At first I threw the lot at the URL using the PUT (so delete what's there before write) but realised the buffer filled up too quickly. I then broke the records down into groups of 200 and wrote sequentially, but of course the PUT's are overwriting one another (resolved the buffer though).

My next attempt was to do one PUT and then a PATCH but the PATCH is coming over as unsupported.

I'm probably just unaware of the best method and standing by to learn what it is!

Thanks,

Andrew

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 9, 2022, 9:54pm UTC](https://discuss.elastic.co/t/delete-all-and-multiple-bulk-puts/293756/2 "2022-01-09T21:54:29Z")

</div>

Welcome to our community! 😃

Elasticsearch doesn't support patch, so I am not sure what your expectations there are.  
However, you should aim for a few thousand per bulk, \<5K really. And you should run one request at a time.

---

<div class="post-metadata">

**Author:** ![snoopy20](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@snoopy20](https://discuss.elastic.co/u/snoopy20)\
**Post date:** [January 10, 2022, 8:59am UTC](https://discuss.elastic.co/t/delete-all-and-multiple-bulk-puts/293756/3 "2022-01-10T08:59:22Z")

</div>

I've solved it -

1. delete index
2. recreate index
3. run sequenced PUT's but keep track of the index and add the length for each PUT

---

<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:** [February 7, 2022, 8:59am UTC](https://discuss.elastic.co/t/delete-all-and-multiple-bulk-puts/293756/4 "2022-02-07T08:59:44Z")

</div>

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