# Reserved underscore field names

**URL:** <https://discuss.elastic.co/t/reserved-underscore-field-names/319212>\
**Category:** Elasticsearch\
**Tags:** runtime-fields\
**Created:** [November 17, 2022, 2:45pm UTC](https://discuss.elastic.co/t/reserved-underscore-field-names/319212 "2022-11-17T14:45:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![6NMgfDwZ3](https://avatars.discourse-cdn.com/v4/letter/6/ac91a4/32.png) [@6NMgfDwZ3](https://discuss.elastic.co/u/6NMgfDwZ3)\
**Post date:** [November 17, 2022, 2:45pm UTC](https://discuss.elastic.co/t/reserved-underscore-field-names/319212/1 "2022-11-17T14:45:57Z")

</div>

Hello,

ELK stack version: v7.x ... latest (Elasticsearch + Kibana + Filebeat)

there are fields in the `documents` like `_id`, `_index`, `_score`, `_type` .

I would like to add custom fields with names starting with an underscore like `_myfield` to my documents.

Where could I check that my underscored field names won't conflict with the ELK's predefined ones?

BTW I would like to do that because I'd like to sort some more important fields up in the fields list (alphabetical order) when I expand a document in Kibana/Discover

---

<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:** [November 21, 2022, 1:59am UTC](https://discuss.elastic.co/t/reserved-underscore-field-names/319212/2 "2022-11-21T01:59:19Z")

</div>

I don't think we have anything fully documented on this sorry to say.

I think you've covered most of them though.

---

<div class="post-metadata">

**Author:** ![6NMgfDwZ3](https://avatars.discourse-cdn.com/v4/letter/6/ac91a4/32.png) [@6NMgfDwZ3](https://discuss.elastic.co/u/6NMgfDwZ3)\
**Post date:** [November 24, 2022, 9:39am UTC](https://discuss.elastic.co/t/reserved-underscore-field-names/319212/3 "2022-11-24T09:39:46Z")

</div>

thank you for your reply!

Do you think `_myimportantfield` would be a bad practice? and `!myimportantfield` ?

Or is there any more proper way to elevate important fields top of the field list in Kibana/Discover view?

---

<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:** [November 29, 2022, 12:59am UTC](https://discuss.elastic.co/t/reserved-underscore-field-names/319212/4 "2022-11-29T00:59:10Z")

</div>

Both of those are possible to create in Elasticsearch, maybe the use of `!` might be a clearer indicator that this is not an Elasticsearch meta/reserved field. We don't really have guidelines or best practises around this sort of thing.

---

<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:** [December 27, 2022, 12:59am UTC](https://discuss.elastic.co/t/reserved-underscore-field-names/319212/5 "2022-12-27T00:59:36Z")

</div>

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