Kibana Viz can't filter 1 from 11,12,13; 2 from 21,22, etc

I have a vizualization that is a line graph of cpu usage by core. If I select core 38 from the legend, the viz shows values for 38 and 3. Is this a bug, a symptom of metricbeat setting core id as strings, or is there a setting that can fix this?

Yeah it looks like it's a symptom of the core id being a string. The search string is matching on the substring - can you check that metricbeat has a template loaded and if not add it?

https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-template.html has a guide for getting it setup

The template sees core.id as a number.

In my viz I am grouping by term core.id. Does grouping by term automatically treat the value as a string?