Key names in bucket listing are truncated


(Frederes) #1

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:


(David Pilato) #2

Do not analyze text when you run aggs.


(Frederes) #3

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


(Frederes) #4

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

Is this the right way to avoid this ?


(David Pilato) #5

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.


(Frederes) #6

Thank you so much :wink:


(system) #7