# Use of field aliases in app search

**URL:** <https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [December 11, 2020, 7:17am UTC](https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377 "2020-12-11T07:17:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ndosa](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@ndosa](https://discuss.elastic.co/u/ndosa)\
**Post date:** [December 11, 2020, 7:17am UTC](https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377/1 "2020-12-11T07:17:28Z")

</div>

Apologies if this has been covered previously, but is it possible to use field aliases or a display names for fields in app search ?

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [December 11, 2020, 3:26pm UTC](https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377/2 "2020-12-11T15:26:09Z")

</div>

Hey @ndosa,

We don't have anything like that. Not sure what your use case is but this is something you can easily handle in your consuming code, i.e., mapping a field name to a display name.

Jason

---

<div class="post-metadata">

**Author:** ![ndosa](https://avatars.discourse-cdn.com/v4/letter/n/f475e1/32.png) [@ndosa](https://discuss.elastic.co/u/ndosa)\
**Post date:** [December 11, 2020, 6:22pm UTC](https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377/3 "2020-12-11T18:22:19Z")

</div>

Thanks for getting back to me Jason, we are designing a search function for a documents where attributes have a human readable name and also an identifier, so wondering how to make search, filtering and sorting more user-friendly, based on the actual human readable name (which contains spaces and other characters that are invalid for an app search field).

I suppose what you're saying is to look at the search-ui for a way to map field identifiers to their human readable names ?

Thanks again

---

<div class="post-metadata">

**Author:** ![JasonStoltz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasonstoltz/32/49893_2.png) [@JasonStoltz](https://discuss.elastic.co/u/JasonStoltz)\
**Post date:** [December 11, 2020, 6:54pm UTC](https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377/4 "2020-12-11T18:54:29Z")

</div>

Are you using the search-ui library?

Regardless of what you're using for your front end you'll need to map to display values at some point. You'd basically just have a field name to display name hash that you check any time before rendering a display value to the page.

We do this on [https://www.elastic.co/search](https://www.elastic.co/search), for instance. The product names listed on the left are all display friendly values. Before rendering, we do a bit of formatting ... upper case, convert dashes to spaces, and also look up display names from a hash.

---

<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:** [January 8, 2021, 6:55pm UTC](https://discuss.elastic.co/t/use-of-field-aliases-in-app-search/258377/5 "2021-01-08T18:55:07Z")

</div>

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