# Combining data from two document types in Kibana Visualization

**URL:** https://discuss.elastic.co/t/combining-data-from-two-document-types-in-kibana-visualization/121826
**Category:** Kibana
**Created:** [February 28, 2018, 10:36am UTC](https://discuss.elastic.co/t/combining-data-from-two-document-types-in-kibana-visualization/121826 "2018-02-28T10:36:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![vinay.bhardwaj](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vinay.bhardwaj](https://discuss.elastic.co/u/vinay.bhardwaj)
#### Post date: [February 28, 2018, 10:36am UTC](https://discuss.elastic.co/t/combining-data-from-two-document-types-in-kibana-visualization/121826/1 "2018-02-28T10:36:57Z")

</div>

How can I combine data from two different types in Kibana?

Suppose I have a document type 'child' with fields 'firstName' & 'fathersFirstName' and document type 'parent' with fields 'firstName' & 'lastName'.  
I want to show 'firstName' from 'child' document type and 'lastName' from 'parent' document type in Kiaban Visualization depending on 'fathersFirstName' from 'child' and 'firstName' from 'parent'.

---

<div class="post-metadata">

### Author: ![vinay.bhardwaj](https://avatars.discourse-cdn.com/v4/letter/v/c67d28/32.png) [@vinay.bhardwaj](https://discuss.elastic.co/u/vinay.bhardwaj)
#### Post date: [March 1, 2018, 7:16am UTC](https://discuss.elastic.co/t/combining-data-from-two-document-types-in-kibana-visualization/121826/2 "2018-03-01T07:16:08Z")

</div>

Is there any way to do this?

---

<div class="post-metadata">

### Author: ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)
#### Post date: [March 1, 2018, 8:20pm UTC](https://discuss.elastic.co/t/combining-data-from-two-document-types-in-kibana-visualization/121826/3 "2018-03-01T20:20:30Z")

</div>

I'll preface this by saying that Elasticsearch doesn't support multiple types in a single index in 6.x, and will be removing types completely in the future. Just something to be aware of.

`_type` is basically any other field, but it happens to have special meaning to ES (for now). it sounds like you are trying to index two different types of document, `parent` and `child`, in a single index. While this is certainly possible, it can result in unexpected behavior. For example, if you filter or query on a field, the results will not include any documents that don't have that field.

All that said, you can generate a table with both values, but there's no way to combine both into a single field. So you can do this:

```auto
type | fathersFirstName | firstName
------ | ------- | -----
parent | | name
child | name | 

```

But not this:

```auto
type | name
------ | -------
parent | name
child | name

```

---

<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 29, 2018, 8:20pm UTC](https://discuss.elastic.co/t/combining-data-from-two-document-types-in-kibana-visualization/121826/4 "2018-03-29T20:20:50Z")

</div>

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