# Store field one time like an id?

**URL:** <https://discuss.elastic.co/t/store-field-one-time-like-an-id/79291>\
**Category:** Elasticsearch\
**Created:** [March 20, 2017, 4:42pm UTC](https://discuss.elastic.co/t/store-field-one-time-like-an-id/79291 "2017-03-20T16:42:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Beuhlet\_Reseau](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@Beuhlet\_Reseau](https://discuss.elastic.co/u/Beuhlet_Reseau)\
**Post date:** [March 20, 2017, 4:42pm UTC](https://discuss.elastic.co/t/store-field-one-time-like-an-id/79291/1 "2017-03-20T16:42:41Z")

</div>

Hello,

The contexte is follow it :

5 millions log lines are upload with some fields.

Among these fields, one is often the same.

I ask myself this question, it's possible to store field one time, **Under the form field =\> id ?**

it's allow to save disk space, Because instead of saving X times the same fields, This field is saved only once

And a translation field =\> id is made? You see what I want to do?

Thank you for your help !

---

<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:** [March 21, 2017, 8:33pm UTC](https://discuss.elastic.co/t/store-field-one-time-like-an-id/79291/2 "2017-03-21T20:33:58Z")

</div>

This isn't possible natively, you would need to have a client that checked for existing duplication and then updated accordingly.

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2017, 8:40pm UTC](https://discuss.elastic.co/t/store-field-one-time-like-an-id/79291/3 "2017-03-21T20:40:01Z")

</div>

I believe Elasticsearch stores this type of data quite efficiently, so there may be less gain than you anticipate for your alternate solution.

---

<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:** [April 18, 2017, 8:40pm UTC](https://discuss.elastic.co/t/store-field-one-time-like-an-id/79291/4 "2017-04-18T20:40:07Z")

</div>

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