# I can create a document with a '/' in the ID but I can't delete it

**URL:** <https://discuss.elastic.co/t/i-can-create-a-document-with-a-in-the-id-but-i-cant-delete-it/231441>\
**Category:** Elasticsearch\
**Created:** [May 7, 2020, 3:25am UTC](https://discuss.elastic.co/t/i-can-create-a-document-with-a-in-the-id-but-i-cant-delete-it/231441 "2020-05-07T03:25:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarang\_Dharmapurikar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sarang_dharmapurikar/32/67846_2.png) [@Sarang\_Dharmapurikar](https://discuss.elastic.co/u/Sarang_Dharmapurikar)\
**Post date:** [May 7, 2020, 3:25am UTC](https://discuss.elastic.co/t/i-can-create-a-document-with-a-in-the-id-but-i-cant-delete-it/231441/1 "2020-05-07T03:25:02Z")

</div>

Hi folks,

I tried to PUT a document in elastic index and I used a document ID that's: abc/xyz  
so it has a / in it.

It gets created fine. But I'm not able to delete the document with that ID. Probably because the / is considered part of the URL and not a valid id? But then why does elastic allow me to create it in first place? How do I delete this document now?

Appreciate your help!

Thanks,  
-S

---

<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:** [May 7, 2020, 6:23am UTC](https://discuss.elastic.co/t/i-can-create-a-document-with-a-in-the-id-but-i-cant-delete-it/231441/2 "2020-05-07T06:23:32Z")

</div>

Welcome!

I think you need to URLEncode the id.

---

<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:** [June 4, 2020, 6:23am UTC](https://discuss.elastic.co/t/i-can-create-a-document-with-a-in-the-id-but-i-cant-delete-it/231441/3 "2020-06-04T06:23:32Z")

</div>

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