# Terms Aggregation in kibana Visualization - keyword field not found

**URL:** https://discuss.elastic.co/t/terms-aggregation-in-kibana-visualization-keyword-field-not-found/115693
**Category:** Kibana
**Created:** [January 16, 2018, 10:50am UTC](https://discuss.elastic.co/t/terms-aggregation-in-kibana-visualization-keyword-field-not-found/115693 "2018-01-16T10:50:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![nampord](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nampord](https://discuss.elastic.co/u/nampord)
#### Post date: [January 16, 2018, 10:50am UTC](https://discuss.elastic.co/t/terms-aggregation-in-kibana-visualization-keyword-field-not-found/115693/1 "2018-01-16T10:50:43Z")

</div>

Hi

when defining a mapping as

```auto
PUT spl
{
  "mappings": {
    "spl": {
      "properties": {
        "list": {
          "type": "keyword"
        }
      }
    }
  }
}

```

The fields selection in the visualization / aggregation setup shows a field list.keyword, but the aggregation does not find any data. ( Terms aggregation works with DSL fo rhti smapping)

Setting up the mapping as

```auto
PUT spl
{
  "mappings": {
    "spl": {
      "properties": {
        "list": {
          "type": "keyword",
"fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
        }
      }
    }
  }
}

```

fixes the issues, but is this not a bit redundant ?

Or is there something else incorrect in my mapping / understanding

Thanks

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [January 16, 2018, 7:24pm UTC](https://discuss.elastic.co/t/terms-aggregation-in-kibana-visualization-keyword-field-not-found/115693/2 "2018-01-16T19:24:04Z")

</div>

Your first mapping should be sufficient, but Kibana might have an out-of-date cache. When you change your mapping you need to go to the index pattern in Kibana's Management \> Index Patterns app and click the refresh button on the top right of the page.

![image](https://us1.discourse-cdn.com/elastic/original/3X/f/b/fbdedca3e9d6f7cf5fb20da39cc7f6e5785052e1.png)

---

<div class="post-metadata">

### Author: ![nampord](https://avatars.discourse-cdn.com/v4/letter/n/e47c2d/32.png) [@nampord](https://discuss.elastic.co/u/nampord)
#### Post date: [January 18, 2018, 10:57am UTC](https://discuss.elastic.co/t/terms-aggregation-in-kibana-visualization-keyword-field-not-found/115693/3 "2018-01-18T10:57:42Z")

</div>

Thanks for your reply, this indeed solved the issue.

---

<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: [February 15, 2018, 11:06am UTC](https://discuss.elastic.co/t/terms-aggregation-in-kibana-visualization-keyword-field-not-found/115693/4 "2018-02-15T11:06:42Z")

</div>

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