# Alias for Type

**URL:** <https://discuss.elastic.co/t/alias-for-type/12040>\
**Category:** Elasticsearch\
**Created:** [May 20, 2013, 3:45pm UTC](https://discuss.elastic.co/t/alias-for-type/12040 "2013-05-20T15:45:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin\_Sanders](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Benjamin\_Sanders](https://discuss.elastic.co/u/Benjamin_Sanders)\
**Post date:** [May 20, 2013, 3:45pm UTC](https://discuss.elastic.co/t/alias-for-type/12040/1 "2013-05-20T15:45:23Z")

</div>

I have seen several requests for the ability to alias types as opposed to  
only aliasing the indexes. I too would love to see this feature. Is this a  
feature that is supported and I somehow missed it? Is it in the plans for a  
future version of elasticsearch?

Thanks,

- Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [May 20, 2013, 8:22pm UTC](https://discuss.elastic.co/t/alias-for-type/12040/2 "2013-05-20T20:22:21Z")

</div>

There is nothing in the pipeline for this. Can you elaborate why you want  
this a bit more. I am trying to understand the need for it more.

thanks,

simon  
On Monday, May 20, 2013 5:45:23 PM UTC+2, Benjamin Sanders wrote:

> I have seen several requests for the ability to alias types as opposed to  
> only aliasing the indexes. I too would love to see this feature. Is this a  
> feature that is supported and I somehow missed it? Is it in the plans for a  
> future version of elasticsearch?
> 
> Thanks,
> 
> - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Benjamin\_Sanders](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@Benjamin\_Sanders](https://discuss.elastic.co/u/Benjamin_Sanders)\
**Post date:** [May 20, 2013, 9:40pm UTC](https://discuss.elastic.co/t/alias-for-type/12040/3 "2013-05-20T21:40:41Z")

</div>

Hi Simon,

The need is pretty similar to the need for aliases on indexes. I am  
building an API for looking up and searching products by company and  
category. I am using the company name as the index name, and the category  
name as the type name. This makes some sense as most of the products in any  
given category have very similar types of data. What I need is a way to  
have subcategories pre-defined as a subset of a given type, and/or cross  
category searching via a supercategory name, but always within a given  
company (index).

Also, how large of a task do you think it would be to add this  
functionality? I am familiar with Java and not averse to helping out with  
the project. I assume I should submit some bug-fixes first  
to acquaint myself with the codebase, but it is conceivable that I might  
contribute this type of functionality if it would be welcomed.

- Ben

On Monday, May 20, 2013 3:22:21 PM UTC-5, simonw wrote:

> There is nothing in the pipeline for this. Can you elaborate why you want  
> this a bit more. I am trying to understand the need for it more.
> 
> thanks,
> 
> simon  
> On Monday, May 20, 2013 5:45:23 PM UTC+2, Benjamin Sanders wrote:
> 
> > I have seen several requests for the ability to alias types as opposed to  
> > only aliasing the indexes. I too would love to see this feature. Is this a  
> > feature that is supported and I somehow missed it? Is it in the plans for a  
> > future version of elasticsearch?
> > 
> > Thanks,
> > 
> > - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![brian\_yoder](https://avatars.discourse-cdn.com/v4/letter/b/f1d935/32.png) [@brian\_yoder](https://discuss.elastic.co/u/brian_yoder)\
**Post date:** [May 20, 2013, 9:51pm UTC](https://discuss.elastic.co/t/alias-for-type/12040/4 "2013-05-20T21:51:53Z")

</div>

Just a thought: Add a category field to each document and add one or more  
categories to a query along with the subtypes.

On Monday, May 20, 2013 5:40:41 PM UTC-4, Benjamin Sanders wrote:

> Hi Simon,
> 
> The need is pretty similar to the need for aliases on indexes. I am  
> building an API for looking up and searching products by company and  
> category. I am using the company name as the index name, and the category  
> name as the type name. This makes some sense as most of the products in any  
> given category have very similar types of data. What I need is a way to  
> have subcategories pre-defined as a subset of a given type, and/or cross  
> category searching via a supercategory name, but always within a given  
> company (index).
> 
> Also, how large of a task do you think it would be to add this  
> functionality? I am familiar with Java and not averse to helping out with  
> the project. I assume I should submit some bug-fixes first  
> to acquaint myself with the codebase, but it is conceivable that I might  
> contribute this type of functionality if it would be welcomed.
> 
> - Ben
> 
> On Monday, May 20, 2013 3:22:21 PM UTC-5, simonw wrote:
> 
> > There is nothing in the pipeline for this. Can you elaborate why you want  
> > this a bit more. I am trying to understand the need for it more.
> > 
> > thanks,
> > 
> > simon  
> > On Monday, May 20, 2013 5:45:23 PM UTC+2, Benjamin Sanders wrote:
> > 
> > > I have seen several requests for the ability to alias types as opposed  
> > > to only aliasing the indexes. I too would love to see this feature. Is this  
> > > a feature that is supported and I somehow missed it? Is it in the plans for  
> > > a future version of elasticsearch?
> > > 
> > > Thanks,
> > > 
> > > - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [May 21, 2013, 7:24am UTC](https://discuss.elastic.co/t/alias-for-type/12040/5 "2013-05-21T07:24:14Z")

</div>

While I agree with the category Idea I think the main problem here is not  
implementing the functionality but rather testing it throughout the  
application. Something like this spreads everywhere and must be supported  
everywhere. Like we support type in the URL but also in some queries like  
`top_children` etc. as long as there is not usecase that you can't build  
easily in the app layer I'd rather stay away from adding this. aka. not  
worth the trouble?

simon

On Monday, May 20, 2013 11:51:53 PM UTC+2, InquiringMind wrote:

> Just a thought: Add a category field to each document and add one or more  
> categories to a query along with the subtypes.
> 
> On Monday, May 20, 2013 5:40:41 PM UTC-4, Benjamin Sanders wrote:
> 
> > Hi Simon,
> > 
> > The need is pretty similar to the need for aliases on indexes. I am  
> > building an API for looking up and searching products by company and  
> > category. I am using the company name as the index name, and the category  
> > name as the type name. This makes some sense as most of the products in any  
> > given category have very similar types of data. What I need is a way to  
> > have subcategories pre-defined as a subset of a given type, and/or cross  
> > category searching via a supercategory name, but always within a given  
> > company (index).
> > 
> > Also, how large of a task do you think it would be to add this  
> > functionality? I am familiar with Java and not averse to helping out with  
> > the project. I assume I should submit some bug-fixes first  
> > to acquaint myself with the codebase, but it is conceivable that I might  
> > contribute this type of functionality if it would be welcomed.
> > 
> > - Ben
> > 
> > On Monday, May 20, 2013 3:22:21 PM UTC-5, simonw wrote:
> > 
> > > There is nothing in the pipeline for this. Can you elaborate why you  
> > > want this a bit more. I am trying to understand the need for it more.
> > > 
> > > thanks,
> > > 
> > > simon  
> > > On Monday, May 20, 2013 5:45:23 PM UTC+2, Benjamin Sanders wrote:
> > > 
> > > > I have seen several requests for the ability to alias types as opposed  
> > > > to only aliasing the indexes. I too would love to see this feature. Is this  
> > > > a feature that is supported and I somehow missed it? Is it in the plans for  
> > > > a future version of elasticsearch?
> > > > 
> > > > Thanks,
> > > > 
> > > > - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![btiernay](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@btiernay](https://discuss.elastic.co/u/btiernay)\
**Post date:** [May 23, 2013, 12:57am UTC](https://discuss.elastic.co/t/alias-for-type/12040/6 "2013-05-23T00:57:20Z")

</div>

FYI - related post:  
[https://groups.google.com/forum/#!searchin/elasticsearch/junjun/elasticsearch/y7x6aVwnkKo/MUCXSuEmxSIJ](https://groups.google.com/forum/#!searchin/elasticsearch/junjun/elasticsearch/y7x6aVwnkKo/MUCXSuEmxSIJ)

I guess I don't understand why index aliasing would be supported, but not  
type. What's the rationale for the inconsistency from an API perspective?  
If its just "not worth the trouble", why not? Just trying to understand.

Thanks again,

Bob

On Tuesday, 21 May 2013 03:24:14 UTC-4, simonw wrote:

> While I agree with the category Idea I think the main problem here is not  
> implementing the functionality but rather testing it throughout the  
> application. Something like this spreads everywhere and must be supported  
> everywhere. Like we support type in the URL but also in some queries like  
> `top_children` etc. as long as there is not usecase that you can't build  
> easily in the app layer I'd rather stay away from adding this. aka. not  
> worth the trouble?
> 
> simon
> 
> On Monday, May 20, 2013 11:51:53 PM UTC+2, InquiringMind wrote:
> 
> > Just a thought: Add a category field to each document and add one or more  
> > categories to a query along with the subtypes.
> > 
> > On Monday, May 20, 2013 5:40:41 PM UTC-4, Benjamin Sanders wrote:
> > 
> > > Hi Simon,
> > > 
> > > The need is pretty similar to the need for aliases on indexes. I am  
> > > building an API for looking up and searching products by company and  
> > > category. I am using the company name as the index name, and the category  
> > > name as the type name. This makes some sense as most of the products in any  
> > > given category have very similar types of data. What I need is a way to  
> > > have subcategories pre-defined as a subset of a given type, and/or cross  
> > > category searching via a supercategory name, but always within a given  
> > > company (index).
> > > 
> > > Also, how large of a task do you think it would be to add this  
> > > functionality? I am familiar with Java and not averse to helping out with  
> > > the project. I assume I should submit some bug-fixes first  
> > > to acquaint myself with the codebase, but it is conceivable that I might  
> > > contribute this type of functionality if it would be welcomed.
> > > 
> > > - Ben
> > > 
> > > On Monday, May 20, 2013 3:22:21 PM UTC-5, simonw wrote:
> > > 
> > > > There is nothing in the pipeline for this. Can you elaborate why you  
> > > > want this a bit more. I am trying to understand the need for it more.
> > > > 
> > > > thanks,
> > > > 
> > > > simon  
> > > > On Monday, May 20, 2013 5:45:23 PM UTC+2, Benjamin Sanders wrote:
> > > > 
> > > > > I have seen several requests for the ability to alias types as opposed  
> > > > > to only aliasing the indexes. I too would love to see this feature. Is this  
> > > > > a feature that is supported and I somehow missed it? Is it in the plans for  
> > > > > a future version of elasticsearch?
> > > > > 
> > > > > Thanks,
> > > > > 
> > > > > - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![simonw\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/simonw_2/32/1130_2.png) [@simonw\_2](https://discuss.elastic.co/u/simonw_2)\
**Post date:** [May 23, 2013, 7:17am UTC](https://discuss.elastic.co/t/alias-for-type/12040/7 "2013-05-23T07:17:04Z")

</div>

On Thursday, May 23, 2013 2:57:20 AM UTC+2, btiernay wrote:

> FYI - related post:  
> [Redirecting to Google Groups](https://groups.google.com/forum/#!searchin/elasticsearch/junjun/elasticsearch/y7x6aVwnkKo/MUCXSuEmxSIJ)
> 
> I guess I don't understand why index aliasing would be supported, but not  
> type. What's the rationale for the inconsistency from an API perspective?  
> If its just "not worth the trouble", why not? Just trying to understand.

so first of all I don't think this is an inconsistency. Just because you  
can alisas an index doesn't mean you can alias everything else. Regarding  
worth the trouble, this is a pretty big change and litereally everything  
that interacts with types must support it. I can totally see several weeks  
going into development here hence "worth the trouble". If you can make it  
work without this tailored feature then I would rather not go down the road  
and have type aliases. Does this make sense?

Regarding the link, multiple child types is a different story IMO.

simon

> Thanks again,
> 
> Bob
> 
> On Tuesday, 21 May 2013 03:24:14 UTC-4, simonw wrote:
> 
> > While I agree with the category Idea I think the main problem here is not  
> > implementing the functionality but rather testing it throughout the  
> > application. Something like this spreads everywhere and must be supported  
> > everywhere. Like we support type in the URL but also in some queries like  
> > `top_children` etc. as long as there is not usecase that you can't build  
> > easily in the app layer I'd rather stay away from adding this. aka. not  
> > worth the trouble?
> > 
> > simon
> > 
> > On Monday, May 20, 2013 11:51:53 PM UTC+2, InquiringMind wrote:
> > 
> > > Just a thought: Add a category field to each document and add one or  
> > > more categories to a query along with the subtypes.
> > > 
> > > On Monday, May 20, 2013 5:40:41 PM UTC-4, Benjamin Sanders wrote:
> > > 
> > > > Hi Simon,
> > > > 
> > > > The need is pretty similar to the need for aliases on indexes. I am  
> > > > building an API for looking up and searching products by company and  
> > > > category. I am using the company name as the index name, and the category  
> > > > name as the type name. This makes some sense as most of the products in any  
> > > > given category have very similar types of data. What I need is a way to  
> > > > have subcategories pre-defined as a subset of a given type, and/or cross  
> > > > category searching via a supercategory name, but always within a given  
> > > > company (index).
> > > > 
> > > > Also, how large of a task do you think it would be to add this  
> > > > functionality? I am familiar with Java and not averse to helping out with  
> > > > the project. I assume I should submit some bug-fixes first  
> > > > to acquaint myself with the codebase, but it is conceivable that I might  
> > > > contribute this type of functionality if it would be welcomed.
> > > > 
> > > > - Ben
> > > > 
> > > > On Monday, May 20, 2013 3:22:21 PM UTC-5, simonw wrote:
> > > > 
> > > > > There is nothing in the pipeline for this. Can you elaborate why you  
> > > > > want this a bit more. I am trying to understand the need for it more.
> > > > > 
> > > > > thanks,
> > > > > 
> > > > > simon  
> > > > > On Monday, May 20, 2013 5:45:23 PM UTC+2, Benjamin Sanders wrote:
> > > > > 
> > > > > > I have seen several requests for the ability to alias types as  
> > > > > > opposed to only aliasing the indexes. I too would love to see this feature.  
> > > > > > Is this a feature that is supported and I somehow missed it? Is it in the  
> > > > > > plans for a future version of elasticsearch?
> > > > > > 
> > > > > > Thanks,
> > > > > > 
> > > > > > - Ben

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:35am UTC](https://discuss.elastic.co/t/alias-for-type/12040/8 "2017-07-06T02:35:16Z")

</div>


