Hey guys,
is it possible to make some conditions in the JSON Input/Aggregations.
For example:
"aggs": { "calculation": { "sum": { "script": if (doc['Field1'].value - doc['Field2'].value > 0) { ... } } } }
Thanks in advance..
Hey guys,
is it possible to make some conditions in the JSON Input/Aggregations.
For example:
"aggs": { "calculation": { "sum": { "script": if (doc['Field1'].value - doc['Field2'].value > 0) { ... } } } }
Thanks in advance..
I may be misunderstanding what you're trying to do, but it looks like what you need is a scripted field
Yeah, thanks Matt. That's exactly what I searched for
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 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.