[FIXED] Templating variable doesn't work after dashboard import

Hey! We have had a bit of a shuffle and migration from one server to another and as a result we had to migrate our Elasticsearch and Grafana.

I have downloaded dashboards as .JSONs and imported them into the new Grafana. While the “normal” queries work fine, the template query returns nothing.
I have a template varaible that looks like this on the old Grafana:

And this is the query on the new Grafana:

As you may see the new Grafana does not receive any values. Have I missed something?

Before migrating:
Grafana 5.2

After migrating:
Grafana 5.2



ES has changed type from String to Text as their default tyte and disabled fielddata on text as default. This means that Grafana was unable to perform aggregations etc on the indices.
Quix fix is to setfielddata=true for those fields that you want to use.

A porper fix is to reindice the indices with proper fieldtypes.