# Does anyone know if the doc \_id field has to follow a standard or pattern?

**URL:** <https://discuss.elastic.co/t/does-anyone-know-if-the-doc-id-field-has-to-follow-a-standard-or-pattern/357178>\
**Category:** Elasticsearch\
**Created:** [April 11, 2024, 12:35am UTC](https://discuss.elastic.co/t/does-anyone-know-if-the-doc-id-field-has-to-follow-a-standard-or-pattern/357178 "2024-04-11T00:35:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_Sanchez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/diego_sanchez/32/125801_2.png) [@Diego\_Sanchez](https://discuss.elastic.co/u/Diego_Sanchez)\
**Post date:** [April 11, 2024, 12:35am UTC](https://discuss.elastic.co/t/does-anyone-know-if-the-doc-id-field-has-to-follow-a-standard-or-pattern/357178/1 "2024-04-11T00:35:06Z")

</div>

We have a system that uses the path of the URL as doc ID. Everything ran ok until this week when we received a couple of bad requests and transportation errors coming from URLs like this one `../../../example` or `.`. We use the python client and the get function to search the doc by ID, those petitions translated to kibana would be something like this  
GET example-index/\_doc/../../../example or GET example-index/\_doc/.

Thanks in advance for any information or clarification that you could give me.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 15, 2024, 1:56pm UTC](https://discuss.elastic.co/t/does-anyone-know-if-the-doc-id-field-has-to-follow-a-standard-or-pattern/357178/2 "2024-04-15T13:56:00Z")

</div>

Hello,

What is the issue you had? It is not clear, it is also not clear how you create your `_id` as you didn't share any example.

If I'm not wrong the only limitation for the `_id` field is regarding the size, it needs to be smaller than 512 bytes as described in the [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-id-field.html).

---

<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:** [May 13, 2024, 1:56pm UTC](https://discuss.elastic.co/t/does-anyone-know-if-the-doc-id-field-has-to-follow-a-standard-or-pattern/357178/3 "2024-05-13T13:56:36Z")

</div>

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