# Recommendations on field name length

**URL:** <https://discuss.elastic.co/t/recommendations-on-field-name-length/19991>\
**Category:** Elasticsearch\
**Created:** [September 28, 2014, 9:06am UTC](https://discuss.elastic.co/t/recommendations-on-field-name-length/19991 "2014-09-28T09:06:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Giagnocavo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_giagnocavo/32/941_2.png) [@Michael\_Giagnocavo](https://discuss.elastic.co/u/Michael_Giagnocavo)\
**Post date:** [September 28, 2014, 9:06am UTC](https://discuss.elastic.co/t/recommendations-on-field-name-length/19991/1 "2014-09-28T09:06:06Z")

</div>

It seems that the field names in JSON aren't turned into a dictionary, so longer field names end up taking noticeably more space. Especially for compact data, like documents that contain only integer and date fields.

What is the recommendation for handling this? It's easy enough to have client code just serialize with short names ("a", "b", etc.), but then debugging queries or writing them by hand becomes difficult. I think I can use index\_name on mapping, so that a document with field "a" could be indexed as field "createdOn", for example. Then my queries become easier, right? Then it's just the return values (\_source) that has the short names.

Any guidance on this is appreciated.

Thank you.  
-Michael

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/178efdbf33094e00a6bcf1d22140a4e2%40CO1PR07MB331.namprd07.prod.outlook.com](https://groups.google.com/d/msgid/elasticsearch/178efdbf33094e00a6bcf1d22140a4e2%40CO1PR07MB331.namprd07.prod.outlook.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:59am UTC](https://discuss.elastic.co/t/recommendations-on-field-name-length/19991/2 "2017-07-06T00:59:32Z")

</div>


