# Query visualization label from a different index

**URL:** https://discuss.elastic.co/t/query-visualization-label-from-a-different-index/127288
**Category:** Kibana
**Created:** [April 9, 2018, 9:27am UTC](https://discuss.elastic.co/t/query-visualization-label-from-a-different-index/127288 "2018-04-09T09:27:48Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![David\_Gidony](https://avatars.discourse-cdn.com/v4/letter/d/ed655f/32.png) [@David\_Gidony](https://discuss.elastic.co/u/David_Gidony)
#### Post date: [April 9, 2018, 9:27am UTC](https://discuss.elastic.co/t/query-visualization-label-from-a-different-index/127288/1 "2018-04-09T09:27:48Z")

</div>

hi,  
i want to create a visualization with a Top N items from a specific index, to the value of "item ID" which is a number, i have the item name and id in a different index.  
can i change the item names to the fitting "item name" from the second index ? or is there a way to enrich the 1st index ?  
what would be the best way ?

i am reading both of the indexes with log-stash from CSV files.

thanks.

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [April 9, 2018, 5:31pm UTC](https://discuss.elastic.co/t/query-visualization-label-from-a-different-index/127288/2 "2018-04-09T17:31:27Z")

</div>

Hi,

You cannot create visualizations on two index patterns right now in Kibana except for time series. Am not sure if that satisfies your requirement.

This is also more of a data modeling question. You cannot really enrich the 1st index in Kibana. You might be able to create scripted fields: [https://www.elastic.co/guide/en/kibana/current/scripted-fields.html](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) But we still have the problem of a single index.

@LeeDr can I get some help on this?

Thanks,  
Bhavya

---

<div class="post-metadata">

### Author: ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)
#### Post date: [April 10, 2018, 1:47pm UTC](https://discuss.elastic.co/t/query-visualization-label-from-a-different-index/127288/3 "2018-04-10T13:47:19Z")

</div>

You might be able to enrich the 1st index using data from another index. I would start by reviewing this doc;

[https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html)

---

<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: [May 8, 2018, 1:47pm UTC](https://discuss.elastic.co/t/query-visualization-label-from-a-different-index/127288/4 "2018-05-08T13:47:19Z")

</div>

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