# Tag Cloud not working with nested input

**URL:** https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482
**Category:** Kibana
**Created:** [August 16, 2019, 11:23am UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482 "2019-08-16T11:23:22Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![bferrolartyco](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bferrolartyco](https://discuss.elastic.co/u/bferrolartyco)
#### Post date: [August 16, 2019, 11:23am UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482/1 "2019-08-16T11:23:22Z")

</div>

Kibana version: 7.2.0

Hi there!

I'm trying to create a word-cloud visualization (Tag Cloud) in Kibana, using as input a document which has text fields on it. The documents are nested jsons, using one json for each sentence.

The file has this format:

```
{
  "date": "2019-05-23",
  "results": [
    {
      "text": "Hi Mark, could you please help me with ElasticSearch?",
      "speaker": "spk_0"
    },
    {
      "text": "Yeah, sure! how can I help you?",
      "speaker": "spk_1"
    }
]
}

```

And the mapping I've used is:

```
{
  "mappings": {
    "properties": {
      "date": {
        "type": "date",
        "format": "yyyy-MM-dd"
      },
  "results": {
        "type": "nested",
        "properties": {
          "text": {
            "type": "text",
            "fielddata": true
          },
          "speaker": {
            "type": "text"
          }
        }
      }

```

The index seems to work fine but, when I create the Tag Cloud of the field results.text, it returns nothing.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/a/9a122322c54de3d6a9eef0f4df14cfbd62feb268.png)

Perhaps I'm not understanding how the visualization works, I'm new with ES and Kibana.

Do I need to do aggregations before viz?  
Is the index mapping wrong?

Thank you!

---

<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: [August 16, 2019, 4:28pm UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482/2 "2019-08-16T16:28:01Z")

</div>

Hello,

Can you try use keyword mapping and see if it works? Mapping def seems to be the problem here:  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/keyword.html)

Thanks,  
Bhavya

---

<div class="post-metadata">

### Author: ![bferrolartyco](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@bferrolartyco](https://discuss.elastic.co/u/bferrolartyco)
#### Post date: [August 19, 2019, 2:25pm UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482/3 "2019-08-19T14:25:24Z")

</div>

Hello @bhavyarm ,

I tried using the keyword mapping but it still doesen't work. This is how I mapped it:

```
    "results": {
            "type": "nested",
            "properties": {
              "text": {
                "type": "keyword"
              },
              "speaker": {
                "type": "text"
              }

```

Anyway, it is a free text field, should it be keyword?

Thank you 🙂

---

<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: [August 22, 2019, 1:48pm UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482/4 "2019-08-22T13:48:13Z")

</div>

@timroes can I please get some help?

Thanks,  
Bhavya

---

<div class="post-metadata">

### Author: ![timroes](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timroes/32/19712_2.png) [@timroes](https://discuss.elastic.co/u/timroes)
#### Post date: [August 22, 2019, 2:14pm UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482/5 "2019-08-22T14:14:19Z")

</div>

Hi,

Kibana doesn't yet support Nested fields, which you are using in your mapping. Please follow [https://github.com/elastic/kibana/issues/1084](https://github.com/elastic/kibana/issues/1084) for updates on nested field support.

Cheers,  
Tim

---

<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: [September 19, 2019, 2:14pm UTC](https://discuss.elastic.co/t/tag-cloud-not-working-with-nested-input/195482/6 "2019-09-19T14:14:25Z")

</div>

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