# \[SOLVED\] Can Kibana discover documents from an index alias name?

**URL:** <https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454>\
**Category:** Kibana\
**Created:** [November 29, 2016, 9:04am UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454 "2016-11-29T09:04:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbismuth](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Post date:** [November 29, 2016, 9:04am UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/1 "2016-11-29T09:04:31Z")

</div>

Hi,

I've an index named `logstash-1480234219918` and an alias named `logstash-current` pointing to it.

The two URLs below return the same document:

- [http://elasticsearch.cloudera:9200/logstash-1480234219918/sd-output/AVik30mpVVug33Zhnb7u](http://elasticsearch.cloudera:9200/logstash-1480234219918/sd-output/AVik30mpVVug33Zhnb7u)
- [http://elasticsearch.cloudera:9200/logstash-current/sd-output/AVik30mpVVug33Zhnb7u](http://elasticsearch.cloudera:9200/logstash-current/sd-output/AVik30mpVVug33Zhnb7u)

Kibana 5 is setup with `logstash-*` index pattern.

I can retrieve documents when discovering with `_index:logstash-1480234219918` query in the search bar, but no document can be fetched when discovering with `_index:logstash-current` query.

Can Kibana fetch documents from an alias name as an `_index` value?

Thanks,  
Christophe

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [December 1, 2016, 12:22am UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/2 "2016-12-01T00:22:07Z")

</div>

No, that won't work unfortunately. `_index` is a part of the document itself, so even if you query the alias you'll see that the `_index` meta field in each hit still refers to the concrete index.

---

<div class="post-metadata">

**Author:** ![cbismuth](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Post date:** [December 1, 2016, 3:36pm UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/3 "2016-12-01T15:36:13Z")

</div>

Alright I understand, thank you Matt.

Is there any way to make Kibana read from the "latest" index?

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [December 1, 2016, 5:36pm UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/4 "2016-12-01T17:36:15Z")

</div>

You could create an index pattern that points specifically to the "logstash-current" alias. Would that work for you?

---

<div class="post-metadata">

**Author:** ![cbismuth](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Post date:** [December 2, 2016, 10:45am UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/5 "2016-12-02T10:45:30Z")

</div>

That could be a solution, yes. I'll try to do so, thank you Matt!

---

<div class="post-metadata">

**Author:** ![cbismuth](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Post date:** [December 2, 2016, 10:56am UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/6 "2016-12-02T10:56:29Z")

</div>

I have another question Matt: is possible to tell Kibana to discover on a particular index pattern?

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [December 2, 2016, 4:14pm UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/7 "2016-12-02T16:14:28Z")

</div>

If I understand the question correctly, yes you can toggle the index pattern in the top left corner of the Discover app:

![](https://us1.discourse-cdn.com/elastic/original/2X/4/4803117549af6ceba4f1e928c00a6af3de6038af.png)

---

<div class="post-metadata">

**Author:** ![cbismuth](https://avatars.discourse-cdn.com/v4/letter/c/9e8a1a/32.png) [@cbismuth](https://discuss.elastic.co/u/cbismuth)\
**Post date:** [December 2, 2016, 10:09pm UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/8 "2016-12-02T22:09:47Z")

</div>

You've totally understood the point, thank you Matt all your answers were very helpful. Our dashboard journey can start!

---

<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:** [December 30, 2016, 10:09pm UTC](https://discuss.elastic.co/t/solved-can-kibana-discover-documents-from-an-index-alias-name/67454/9 "2016-12-30T22:09:48Z")

</div>

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