Key names in bucket listing are truncated

I have a problem with my aggregation : key names in bucket listing are truncated

Example :
my key value is MF-18500 and in my response, the bucket key is "MF" so all my sums are wrong (because i have multiple key values of kind MF- and they are grouped by "MF")

I don't know why... any help on the topic welcome :wink:

Do not analyze text when you run aggs.

Sorry i don't understand, how to do this ?

OK, i solved my problem specifying "not_analyzed" in the mapping for the field "pod_id"

Is this the right way to avoid this ?

Yes it is.

Note that in 5.0 type string has been replaced by text or keyword. You'll be able to run aggs on the later not the former.

Thank you so much :wink: