Scripted String field is not aggregatable

Hi there,

Kibana 6.2.4 - I have a scripted string field with the following config

name: matchstring
lang: painless
type: string
format: - default -
Popularity: 1
Script: 
m = /.*ElasticSearch\s.*/.matcher(doc['mymessage.keyword'].value);
if ( m.matches() ) {
   return "Search Engine";
}

In the discovery view, data is correctly displayed in the field, however, this field is not aggregatable as it does not show up in the aggregation fields list when building a pie chart. What am I missing?

Could you share a screenshot of the visualization you're trying to build so I can reproduce this? Thanks!

CJ

Hi CJ,

I was able to get the field to show up by typing it in. It didn't show up in the dropdown list by default (it still doesn't), not sure why.

Thanks