# Kibana Dashboard Error -- Set fielddata=true on fieldname

**URL:** https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775
**Category:** Kibana
**Created:** [February 28, 2017, 12:35pm UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775 "2017-02-28T12:35:17Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![taurs](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@taurs](https://discuss.elastic.co/u/taurs)
#### Post date: [February 28, 2017, 12:35pm UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775/1 "2017-02-28T12:35:17Z")

</div>

I am getting docker performance data using metricbeat and I am trying to produce Dashboards out of Docker Performance Data.

**Errors I am getting In Kibana Dashboard:**

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [[docker.container.name](http://docker.container.name)] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [[docker.container.id](http://docker.container.id)] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.

Visualize: Fielddata is disabled on text fields by default. Set fielddata=true on [docker.container.image] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory.  
Can anyone help to fix the issue?

And I enabled fielddata:true in metricbeat.template.json :

```
          "docker": {
      "properties": {
        "container": {
          "properties": {
            "command": {
              "ignore_above": 1024,
              "type": "keyword"
            },
            "created": {
              "type": "date"
            },
            "id": {
              "type": "text",
              "fielddata":"true"
            },
            "image": {
              "type": "text",
              "fielddata": true
            },
            "name": {
              "type": "text",
              "fielddata":true
            },

```

and then I restarted Metricbeat and Kibana and started. Issue still remains.

Can anyone help to fix this issue?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)
#### Post date: [February 28, 2017, 1:22pm UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775/2 "2017-02-28T13:22:24Z")

</div>

I think this can happen if data is sent to Elasticsearch before the template is loaded. Can you run `GET /metricbeat-*` in `Dev tools` and share the output? My guess is the setting in the template file is not being propagated to es.

Also which version are you running? In `5.1.2`, this should happen automatically when you first run metricbeat.

If you don't have any data you need to preserve, you can try deleting the index and starting again. You can also try sending data to a new index name.

---

<div class="post-metadata">

### Author: ![taurs](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@taurs](https://discuss.elastic.co/u/taurs)
#### Post date: [March 1, 2017, 6:37am UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775/3 "2017-03-01T06:37:49Z")

</div>

```auto
{
  "metricbeat-docker-2017.02.27": {
    "aliases": {},
    "mappings": {
      "_default_": {
        "_all": {
          "norms": false
        },
          "docker": {
            "properties": {
              "container": {
                "properties": {
                  "command": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
                  "created": {
                    "type": "date"
                  },
                  "id": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
                  "image": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  },
 "settings": {
      "index": {
        "refresh_interval": "5s",
        "number_of_shards": "5",
        "provided_name": "metricbeat-2017.02.13",
        "creation_date": "1486944216468",
        "number_of_replicas": "1",
        "uuid": "-f78lFnRRe-Dbc1GB01hsA",
        "version": {
          "created": "5000099"
        }
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)
#### Post date: [March 2, 2017, 2:16pm UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775/4 "2017-03-02T14:16:13Z")

</div>

Yea, your fields are still marked as text only. If you change the visualizations to use the `.keyword` version it should work. For example change `command` to `command.keyword`. The `.keyword` variations are aggregatable.

---

<div class="post-metadata">

### Author: ![taurs](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@taurs](https://discuss.elastic.co/u/taurs)
#### Post date: [March 3, 2017, 9:26am UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775/5 "2017-03-03T09:26:39Z")

</div>

PUT /metricbeat-docker-2017.02.29  
"mappings": {  
"docker": {  
"properties": {  
"command.keyword":{  
"name": {  
"type": "text",  
"fielddata": true  
},  
"id": {  
"type": "integer",  
"fielddata": true  
},  
"image": {  
"type": "text",  
"fielddata": true  
}  
}  
}  
}  
}

I am getting an error that -  
"type": "index\_already\_exists\_exception",  
"reason": "index [metricbeat-docker-2017.02.29/qtGXcW0MSWS1JOl1gt55zw] already exists",  
"index\_uuid": "qtGXcW0MSWS1JOl1gt55zw",  
"index": "metricbeat-docker-2017.02.29"  
},  
"status": 400

can you please help me with this

---

<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 31, 2017, 9:27am UTC](https://discuss.elastic.co/t/kibana-dashboard-error-set-fielddata-true-on-fieldname/76775/6 "2017-03-31T09:27:10Z")

</div>

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