# Field Alias in Discover Plugin

**URL:** <https://forum.opensearch.org/t/field-alias-in-discover-plugin/21892>\
**Category:** OpenSearch Dashboards\
**Tags:** discuss, troubleshoot\
**Created:** [October 9, 2024, 1:54pm UTC](https://forum.opensearch.org/t/field-alias-in-discover-plugin/21892 "2024-10-09T13:54:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpeters](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@cpeters](https://forum.opensearch.org/u/cpeters)\
**Post date:** [October 9, 2024, 1:54pm UTC](https://forum.opensearch.org/t/field-alias-in-discover-plugin/21892/1 "2024-10-09T13:54:48Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):

2.16.0/Google Chrome

**Describe the issue** :  
I’m trying to create a field alias for relevant fields in my index. As an example, I have a field `products.product_id` that I want to appear as “Product ID”. I would like this to appear in the “Available Fields” on the left-hand side, as well as anywhere else in the Discover plugin. Internally however, I want it still to refer to it as `products.product_id` for tracking. Is there any way I can do this?

I’ve tried to create aliases with the Dev Tools using the \_mappings endpoint, however that does not change the appearance of the data anywhere except the Filters.

I’m just trying to create a more human readable version of the field, any ideas?

Thanks.

**Configuration** :

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![Eugene7](https://avatars.discourse-cdn.com/v4/letter/e/bbce88/32.png) [@Eugene7](https://forum.opensearch.org/u/Eugene7)\
**Post date:** [October 9, 2024, 5:45pm UTC](https://forum.opensearch.org/t/field-alias-in-discover-plugin/21892/2 "2024-10-09T17:45:10Z")

</div>

Hi @cpeters,

There is an open issue on GitHub with a similar request:

> <https://github.com/opensearch-project/OpenSearch-Dashboards/issues/914>
>
> \*\*Is your feature request related to a problem? Please describe.\*\*
> 
> It would b…e nice to be able to rename fields in Dashboards similar to the OS alias feature. Also becomes more important when you have nested field names which can get unwieldy in the UI.
> 
> \*\*Describe the solution you'd like\*\*
> 
> Something like this: https://github.com/elastic/kibana/pull/70039; related to this https://github.com/elastic/kibana/issues/69908
> 
> \*\*Describe alternatives you've considered\*\*
> 
> None at this point, aside from renaming the fields before ingestion, which would be a pain for alot of reasons.

I managed to rename a field in OpenSearch Dashboards using a Scripted Field. This might work as a workaround for you.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/7/75deb7240bf1c831549c56fd8129f040e3371c9d.png)

 ![image](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/d/d76da2685236d62a6407e68997ff7bdcddfcb03b.png)
