Tag Cloud not working with nested input

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.

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!

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

Thanks,
Bhavya

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 :slight_smile:

@timroes can I please get some help?

Thanks,
Bhavya

Hi,

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

Cheers,
Tim

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