# Upgraded to ELK 5.0 - can no longer create Visualizations with Aggregations

**URL:** <https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725>\
**Category:** Elasticsearch\
**Created:** [November 2, 2016, 2:48pm UTC](https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725 "2016-11-02T14:48:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Ainslie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_ainslie/32/55031_2.png) [@Paul\_Ainslie](https://discuss.elastic.co/u/Paul_Ainslie)\
**Post date:** [November 2, 2016, 2:48pm UTC](https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725/1 "2016-11-02T14:48:25Z")

</div>

I upgraded from ES 2.4 to 5.0 this week.

When I try to create Visualizations with Aggregations in Kibana, the only **numeric** fields that are available to me are the **scripted fields** and none of the **string** fields are available. Yet the other indexes seem to work fine in ES & Kibana 5.0!

 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/ad66fd7688ce8ecafcca69553f970940d4bfefb6.png)

I noticed that none of the fields are 'aggregatable'. Is that why I am unable to create Visualizations with Aggregations?

Here's the index definition (part of it, as I could not fit it all in this post).

```
{
  "mediaserver" : {
    "mappings" : {
      "usage" : {
        "properties" : {
          "@timestamp" : {
            "type" : "date",
            "format" : "strict_date_optional_time||epoch_millis"
          },
          "@version" : {
            "type" : "string"
          },
          "account" : {
            "type" : "string",
            "index" : "not_analyzed",
            "fielddata" : false
          },
          "agent" : {
            "type" : "string"
          },
          "bytes" : {
            "type" : "long"
          },
          "cache_status" : {
            "type" : "string",
            "index" : "not_analyzed",
            "fielddata" : false
          },
          "clientip" : {
            "type" : "ip"
          },
          "geoip" : {
            "properties" : {
              "area_code" : {
                "type" : "short"
              },
              "city_name" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "continent_code" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "country_code2" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "country_code3" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "country_name" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "dma_code" : {
                "type" : "short"
              },
              "ip" : {
                "type" : "ip"
              },
              "latitude" : {
                "type" : "double"
              },
              "location" : {
                "type" : "geo_point"
              },
              "longitude" : {
                "type" : "double"
              },
              "postal_code" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "real_region_name" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "region_name" : {
                "type" : "string",
                "index" : "not_analyzed",
                "fielddata" : false
              },
              "timezone" : {
                "type" : "string"
              }
            }
          },
```

---

<div class="post-metadata">

**Author:** ![Paul\_Ainslie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_ainslie/32/55031_2.png) [@Paul\_Ainslie](https://discuss.elastic.co/u/Paul_Ainslie)\
**Post date:** [November 3, 2016, 1:24pm UTC](https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725/2 "2016-11-03T13:24:22Z")

</div>

I figured it out, when it converted to ES 5.0 it set searchable and aggregatable to false. Argh! Not sure what it did that.

I guess I'll have to create a new index and do a migration.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/0/0d9e9b55681c154cb8f4f015cb25bf0682612292.png)

---

<div class="post-metadata">

**Author:** ![tedivm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tedivm/32/13938_2.png) [@tedivm](https://discuss.elastic.co/u/tedivm)\
**Post date:** [December 16, 2016, 7:42am UTC](https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725/3 "2016-12-16T07:42:26Z")

</div>

Had this happen to me as well. It's an amazingly annoying bug. Is there a way to fix it other than creating new indexes and migrating over? A way to enable it for specific fields, for instance?

---

<div class="post-metadata">

**Author:** ![Paul\_Ainslie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paul_ainslie/32/55031_2.png) [@Paul\_Ainslie](https://discuss.elastic.co/u/Paul_Ainslie)\
**Post date:** [December 16, 2016, 1:27pm UTC](https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725/4 "2016-12-16T13:27:56Z")

</div>

Sorry, you can't change the fields, you have to change them to something like,  
`"filename" : { "type" : "keyword", "index": "not_analyzed" },`  
This can only be done by creating a brand new index, and then initiate a reindex job: to migrate your data like this.

`curl -XPOST localhost:9200/_reindex?pretty -d @my_reindex_file.json`

**Input file**

```
{
  "source": {
    "index": "myindex_v1"
  },
  "dest": {
    "index": "myindex_v2"
  }
}

```

Then check status on running tasks:  
`curl -XGET 'localhost:9200/_tasks?detailed=true&actions=*reindex&pretty'`

Actually, I've reindexed so many times now I have logstash and outside applications use an alias so they don't have to keep changing.

---

<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:** [July 5, 2017, 10:04pm UTC](https://discuss.elastic.co/t/upgraded-to-elk-5-0-can-no-longer-create-visualizations-with-aggregations/64725/5 "2017-07-05T22:04:53Z")

</div>


