Reputation: 73
In Kibana, I'm trying to use Lucene Expression to divide the values of two integer fields.
doc['myval'].value / doc['myvalue'].value
However, the above particular formula doesn't seems to be producing any result. I haven tried to do some changes to this formula putting them in brackets, but still it is not working.
(doc['myval'].value) / (doc['myvalue'].value)
Alternatively, I can divide one field with a numeric value like: doc['myval'].value / 100. Also I can be able to +, - and * between the values in these two fields. But division seems to be not working.
Some of the sample values of fields can be 394,567, 800,567, etc.
How can I divide two integer fields using Lucene expression in Kibana?
Upvotes: 0
Views: 2645
Reputation: 1442
I had similar problem earlier had dropped it after trying much, it was due to wrong data type of the fields. Now testing on ELK5.6 its working fine. Please make changes:
in the script part follow following syntax for division
doc['field_1'].value / doc[field_2].value
where field_1 and field_2 are actual fields in the index.
Some checks :
Upvotes: 1