# Is there such as thing as a "field alias"?

**URL:** <https://discuss.elastic.co/t/is-there-such-as-thing-as-a-field-alias/6732>\
**Category:** Elasticsearch\
**Created:** [February 16, 2012, 4:38pm UTC](https://discuss.elastic.co/t/is-there-such-as-thing-as-a-field-alias/6732 "2012-02-16T16:38:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shane\_Witbeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shane_witbeck/32/2803_2.png) [@Shane\_Witbeck](https://discuss.elastic.co/u/Shane_Witbeck)\
**Post date:** [February 16, 2012, 4:38pm UTC](https://discuss.elastic.co/t/is-there-such-as-thing-as-a-field-alias/6732/1 "2012-02-16T16:38:40Z")

</div>

As I create more complex objects in my index, I'd like to be able to create  
an alias to a specific object/property. For example, create an alias  
"blocks" pointing to "ticket.blocks.ticketNumber". So when doing a query  
string search all you have to type is "blocks:123" instead of  
"ticket.blocks.ticketNumber:123".

Is this possible?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 16, 2012, 7:53pm UTC](https://discuss.elastic.co/t/is-there-such-as-thing-as-a-field-alias/6732/2 "2012-02-16T19:53:06Z")

</div>

No, its not possible. You could change the index name to index it under a different name, and then do the search by it. Note, the mentioned field (ticket.blocks.ticketNumber can also be searchable by ticketNumber).

On Thursday, February 16, 2012 at 6:38 PM, Shane Witbeck wrote:

> As I create more complex objects in my index, I'd like to be able to create an alias to a specific object/property. For example, create an alias "blocks" pointing to "ticket.blocks.ticketNumber". So when doing a query string search all you have to type is "blocks:123" instead of "ticket.blocks.ticketNumber:123".
> 
> Is this possible?

---

<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, 3:39am UTC](https://discuss.elastic.co/t/is-there-such-as-thing-as-a-field-alias/6732/3 "2017-07-06T03:39:03Z")

</div>


