# How to add a new field to an alias?

**URL:** <https://discuss.elastic.co/t/how-to-add-a-new-field-to-an-alias/22744>\
**Category:** Elasticsearch\
**Created:** [March 18, 2015, 5:44pm UTC](https://discuss.elastic.co/t/how-to-add-a-new-field-to-an-alias/22744 "2015-03-18T17:44:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mehmet\_Ozer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mehmet_ozer/32/81567_2.png) [@Mehmet\_Ozer](https://discuss.elastic.co/u/Mehmet_Ozer)\
**Post date:** [March 18, 2015, 5:44pm UTC](https://discuss.elastic.co/t/how-to-add-a-new-field-to-an-alias/22744/1 "2015-03-18T17:44:23Z")

</div>

Dear all,

I am new to Elasticsearch and I want to know how I can add a new field to  
an alias... Let me explain what I am doing,

Actually what I am trying to do is explained here,

> <https://stackoverflow.com/questions/29080751/how-to-change-the-alias-value-on-elasticsearch>

So according to the response that I got, I tried to use "script\_fields"  
while the query, but as a result I got just the filtered result, what I  
want is to get \_source + scripted field.

Second thing I tried was,

I had an alias which was pointin my index, so what I tried to do was to  
have a new alias pointing the same index but scripted filter added this  
time; so I tried to generate a new alias while adding a new scripted field  
but I am still unavailable to do that. Do you have any idea how I can  
continue ?

Thanks a lot

--  
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/b24022b2-915b-43c8-b970-8cdaf0821f6e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b24022b2-915b-43c8-b970-8cdaf0821f6e%40googlegroups.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:25am UTC](https://discuss.elastic.co/t/how-to-add-a-new-field-to-an-alias/22744/2 "2017-07-06T00:25:48Z")

</div>


