How to get maximum value of field in events?


(Saket Kumar) #1

I have two entries of message event, which has two array fields i have to find out maximum length of these array.

Is there any ways.?


(Magnus Bäck) #2

Do you want to find the maximum value of the elements of the array and store that value into a field (either by overwriting the array field or creating a new field), or are you talking about an Elasticsearch query? In the former case you'll probably have to use the ruby filter and write a small Ruby snippet.


(Saket Kumar) #3

Yes want to find the maximum value of the elements of the array and store that value into a field (either by overwriting the array field or creating a new field.


(Magnus Bäck) #4

Well, you seem to be on the right track given your other post (below). Please try to keep related questions together.


(Saket Kumar) #5

Sure .

Thanks for your help!


(system) #6