title: Grafana cannot aggregate on String fields as it does not recognize keyword field in Elasticsearch
body: <p>I have an Elasticsearch (5.1.2) data source and am visualizing the data in Kibana and Grafana (4.1.1). For string values in my dataset I am using the keyword feature as described at <a href="https://www.elastic.co/guide/en/elasticsearch/reference/5.2/fielddata.html" rel="nofollow noreferrer">https://www.elastic.co/guide/en/elasticsearch/reference/5.2/fielddata.html</a>. An example of the mapping for fieldname "CATEGORY":</p>
  
  <pre><code>"CATEGORY": {
    "type": "text",
    "norms": false,
    "fields": {
      "keyword": {
        "type": "keyword"
       }
     }
   }
  </code></pre>
  
  <p>In Kibana this works fine as I can select "fieldname.keyword" when creating visualizations. However in Grafana it seems like the keyword field is not recognized, as I can only select "fieldname" when creating graphs, which displays the message "fielddata is disabled on text fields by default". </p>
  
  <p>Can anyone give any insight as to why the keyword field is not being recognized in Grafana? Setting fielddata=true is an option too, however I would really prefer get it working using keyword due to the memory overhead associated with setting fielddata=true. Thanks!</p>