I want to do this and generate a scripted field
SUM(doc['Field1'].value) /SUM( doc['Field2'].value)
is this possible in Kibana or any work around for this ?
I want to do this and generate a scripted field
SUM(doc['Field1'].value) /SUM( doc['Field2'].value)
is this possible in Kibana or any work around for this ?
Hey mrizwan,
Sorry but I'm pretty sure it is not possible to do as you describe here. Scripted fields are applied after the aggregation. maybe you could apply the sum beforehand, though I need to do more research as to how you might go about that.
Khalah's right - this is not possible with Kibana scripted fields. However, if you install the Timelion plugin, its query language will allow stuff like that: https://www.elastic.co/blog/timelion-timeline
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.