# Delete documents in Enterprise Search

**URL:** <https://discuss.elastic.co/t/delete-documents-in-enterprise-search/305750>\
**Category:** Elastic Search\
**Created:** [May 26, 2022, 7:38pm UTC](https://discuss.elastic.co/t/delete-documents-in-enterprise-search/305750 "2022-05-26T19:38:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haris.sheikh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haris.sheikh/32/106225_2.png) [@haris.sheikh](https://discuss.elastic.co/u/haris.sheikh)\
**Post date:** [May 26, 2022, 7:38pm UTC](https://discuss.elastic.co/t/delete-documents-in-enterprise-search/305750/1 "2022-05-26T19:38:24Z")

</div>

I wanted to delete documents in bulk in enterprise search  
and in documentation, I only found deleted documents by a list of ids.

[https://www.elastic.co/guide/en/app-search/8.2/documents.html#documents-delete](https://www.elastic.co/guide/en/app-search/8.2/documents.html#documents-delete)

but when I try to delete more than 100 records it gives me an error like the image.

 ![Screenshot 2022-05-26 at 9.26.32 PM](https://us1.discourse-cdn.com/elastic/original/3X/6/a/6a754a49de27d0808a7cf588764adc9dce06104f.png)

and when I delete documents in batches it's slow that it timeout

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/e/bea911ef64ca3417ace4c2a3953472c40206b17c.png)

here 53% were deleted and the other 47% were not deleted.

can someone suggest any better solution?

Thanks

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [May 26, 2022, 8:12pm UTC](https://discuss.elastic.co/t/delete-documents-in-enterprise-search/305750/2 "2022-05-26T20:12:57Z")

</div>

Hey @haris.sheikh,

I believe you're using the recommended way of deleting documents from App Search. If serial delete requests are causing timeouts, it's possible your cluster is under-provisioned. You could also try reducing the amount of document ids present in each request.

I hope that helps.

Ross

---

<div class="post-metadata">

**Author:** ![haris.sheikh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/haris.sheikh/32/106225_2.png) [@haris.sheikh](https://discuss.elastic.co/u/haris.sheikh)\
**Post date:** [May 27, 2022, 11:26am UTC](https://discuss.elastic.co/t/delete-documents-in-enterprise-search/305750/3 "2022-05-27T11:26:45Z")

</div>

Yes, it resolved my issue for now. Thanks @ross.bell

---

<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:** [November 4, 2022, 8:35am UTC](https://discuss.elastic.co/t/delete-documents-in-enterprise-search/305750/4 "2022-11-04T08:35:40Z")

</div>


