# Index alias does not show up in discover

**URL:** <https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210>\
**Category:** Kibana\
**Created:** [December 27, 2019, 3:58pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210 "2019-12-27T15:58:54Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [December 27, 2019, 3:58pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/1 "2019-12-27T15:58:55Z")

</div>

I have created aliases to an existing index via update alias as shown in [https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html) in dev tools.

When i use dev tools via GET / it creates a popup with all options allowed for GET including the index aliases i have created. All aliases operations in dev tools work as expected.

When i go to discovery, only the actual index show up in drop down list and not the aliases i have created. I'm using the latest V 7.5.0 release.

It states in the documentation that aliases are used just like index.

My Kibana plugin is banking on the aliases showing up in discovery / kibaban lens as if they were index as stated in the documentation.

Am i missing something? Do i need to modify Kibana configuration to enable this option? is there anything else to do to have this functionality?

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [December 27, 2019, 4:21pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/2 "2019-12-27T16:21:20Z")

</div>

Hi Peter!

You must first set up "Index Patterns" in Kibana's Settings before you can access these aliases in Kibana's UI. You can use wildcards in these patterns to match multiple aliases or index names. See the documentation here: [https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html](https://www.elastic.co/guide/en/kibana/current/tutorial-define-index.html)

Let me know if this still doesn't work or you have any other questions!

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [December 27, 2019, 4:48pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/3 "2019-12-27T16:48:06Z")

</div>

Josh  
Thanks for the quick reply. Is there any way to perform this operation programmatically ?  
I'm creating these aliases via my kibana plugin that i'm writing. Once they are created , can the "setup Index pattern" operation be done via REST API?

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [December 27, 2019, 4:54pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/4 "2019-12-27T16:54:31Z")

</div>

Yes they can be. Index Patterns are stored as "Saved Objects" in the `.kibana` index. You can create these objects using the Saved Objects API. The docs for this API actually use Index Patterns as an example: [https://www.elastic.co/guide/en/kibana/current/saved-objects-api-create.html](https://www.elastic.co/guide/en/kibana/current/saved-objects-api-create.html)

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [December 27, 2019, 5:10pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/5 "2019-12-27T17:10:02Z")

</div>

Josh,  
One last question: Why does it show in dev tools via GET / and not discover?

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [December 27, 2019, 5:11pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/6 "2019-12-27T17:11:21Z")

</div>

Dev Tools simply access Elasticsearch APIs directly, while Discover only shows the Index Patterns that Kibana has configured.

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [December 27, 2019, 5:12pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/7 "2019-12-27T17:12:11Z")

</div>

Josh,  
Thanks for the answers. I really appreciate it.!

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [December 30, 2019, 2:09am UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/8 "2019-12-30T02:09:20Z")

</div>

Josh,  
I noticed the create Save Object APIU is marked as experimental in the docs. Will that be maintained in the future?  
As well, I'm using the elasticsearch javascript api for all kibana calls. For example the 'indices.updateAliases' is used to update the aliases.  
Whats the equivalent for Saved Object API?

---

<div class="post-metadata">

**Author:** ![pgervais](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@pgervais](https://discuss.elastic.co/u/pgervais)\
**Post date:** [January 1, 2020, 4:24pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/9 "2020-01-01T16:24:22Z")

</div>

Josh,  
Can i specify a mapping for an index alias in a similar manner as would be defined for an index? What i want to do is present to the user a subset of the of all the fields in an index.

---

<div class="post-metadata">

**Author:** ![joshdover](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joshdover/32/42020_2.png) [@joshdover](https://discuss.elastic.co/u/joshdover)\
**Post date:** [January 10, 2020, 5:40pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/10 "2020-01-10T17:40:50Z")

</div>

> I noticed the create Save Object APIU is marked as experimental in the docs. Will that be maintained in the future?

It will be maintained, though we may make breaking changes to the API in minor versions. We publish these changes in blog posts to help you keep up with them

> [@pgervais](#):
>
> As well, I'm using the elasticsearch javascript api for all kibana calls. For example the 'indices.updateAliases' is used to update the aliases.  
> Whats the equivalent for Saved Object API?

We don't have an equivalent public client for usage outside Kibana, but if you're using this from Kibana plugin code, you can use the SavedObjectsClient that is available via `core.savedObjects` passed in to your plugin's `setup` function.

> Can i specify a mapping for an index alias in a similar manner as would be defined for an index?

I believe you can set the mappings manually. We don't have any examples of this, but my suggestion would be to go to the Index Pattern setting screen and try creating/modifying an index pattern while inspecting the network requests to see what data is set.

---

<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:** [February 7, 2020, 5:40pm UTC](https://discuss.elastic.co/t/index-alias-does-not-show-up-in-discover/213210/11 "2020-02-07T17:40:50Z")

</div>

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