# Visualization between two indexes

**URL:** https://discuss.elastic.co/t/visualization-between-two-indexes/75854
**Category:** Kibana
**Created:** [February 21, 2017, 10:12am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854 "2017-02-21T10:12:12Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![fetch](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@fetch](https://discuss.elastic.co/u/fetch)
#### Post date: [February 21, 2017, 10:12am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/1 "2017-02-21T10:12:12Z")

</div>

Hello,

I have two indexes - "logstash-\*" and let's call it "myindex".

The first one contains basic information I need. It has the following fields related to my question:

"timestamp"  
"event" - string field  
"myinfo" - string field

The second one contains some additional information that I want to use in couple of visualizations. It also contains one field that could be linked with fields from the "logstash-\*" index:

"myinfo" - string field

What I want to do:

Pull special events from "logstash-\*" index and build a pie chart based on information I have in "myindex" index for every unique occurence of "myinfo" field.

Is it possible?

Or it will be simplier/smarter to update some of my documents in "logstash-\*" index with my additional information?

---

<div class="post-metadata">

### Author: ![lueneburger](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lueneburger](https://discuss.elastic.co/u/lueneburger)
#### Post date: [February 21, 2017, 11:02am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/2 "2017-02-21T11:02:39Z")

</div>

Hi @fetch ,

wouldnt it be easier to put both indexes together?

im doing it with aws ses and postfix and throw them into "my-smtp-\*"

---

<div class="post-metadata">

### Author: ![fetch](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@fetch](https://discuss.elastic.co/u/fetch)
#### Post date: [February 21, 2017, 11:36am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/3 "2017-02-21T11:36:19Z")

</div>

Hey @lueneburger,

Thanks for the reply!

If the thing I want is too complicated to make, then I'll difinitely try to merge information from my second index into the main (logstash-\*).

My initial idea was to distinguish information from different sources into different indexes, but I didn't expect it will bring me troubles with building visualisations.

The reason why I separated some information into the "myindex" is fact that "logstash-\* " index could have a lot of events (up to 100k atm) with the same "myinfo" field, so updating "logstash-\*" index documents will produce overhead.

---

<div class="post-metadata">

### Author: ![lueneburger](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@lueneburger](https://discuss.elastic.co/u/lueneburger)
#### Post date: [February 21, 2017, 12:05pm UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/4 "2017-02-21T12:05:22Z")

</div>

Hi @fetch ,

did you try to create a new index in Kibana with the name "\_all" ?

maybe that could help you 🙂

 ![](https://us1.discourse-cdn.com/elastic/original/2X/7/7d38485e890bf4fce36bfacd4cec4a4581de8de8.png)

don't know how the performance impact is for searches

---

<div class="post-metadata">

### Author: ![fetch](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@fetch](https://discuss.elastic.co/u/fetch)
#### Post date: [February 21, 2017, 12:51pm UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/5 "2017-02-21T12:51:53Z")

</div>

Thanks for the tip, but it doesn't work. None of the documents from the "myindex" satisfy the search query (I'm searching for the specific event).

As far as I understand, in order to make it work, my documents in "myindex" index must have two fields:

"timestamp" - in order to make it possible to visualize depending on the time interval choosen in Kibana  
"event" - because I'm running a search for specific event type

But adding this two fields to the second index will result in is almost the same situation as if I just update my "logstash-\*" index with the additional information from the "myindex".

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 21, 2017, 10:42pm UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/6 "2017-02-21T22:42:21Z")

</div>

Use something like `logstash-*` and `logstash-myindex-*`, then you can use `logstash-*` as the pattern,

---

<div class="post-metadata">

### Author: ![fetch](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@fetch](https://discuss.elastic.co/u/fetch)
#### Post date: [February 22, 2017, 8:03am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/7 "2017-02-22T08:03:00Z")

</div>

Thanks for the reply @warkolm!

I understand the point how to make documents from both indices visible for Kibana.

What I don't understand is _how to draw a pie chart_ using this data.

I want a pie chart, where:

- query performs search for specific string in "event" field of main index
- a slice size represents count of every unique occurence of "myinfo" field (Slice size -\> Count)
- a slice name represents a string field from my second index looked up by corresponding "myinfo" value.

So my problem with the slice naming, is it possible to perform such look up?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 22, 2017, 9:22pm UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/8 "2017-02-22T21:22:28Z")

</div>

> [@fetch](#):
>
> a slice name represents a string field from my second index looked up by corresponding "myinfo" value.

You can't do that.

---

<div class="post-metadata">

### Author: ![fetch](https://avatars.discourse-cdn.com/v4/letter/f/dbc845/32.png) [@fetch](https://discuss.elastic.co/u/fetch)
#### Post date: [February 27, 2017, 8:41am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/9 "2017-02-27T08:41:24Z")

</div>

Okey, thank you.

---

<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: [March 27, 2017, 8:42am UTC](https://discuss.elastic.co/t/visualization-between-two-indexes/75854/10 "2017-03-27T08:42:02Z")

</div>

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