Hi all,
My index fields consists of
- index_name (containing P01, P02)
- X (numbers)
How can i scripted the field to display the subtracted result of P01 of X - P02 of X?
Thanks in advance.
Hi all,
My index fields consists of
How can i scripted the field to display the subtracted result of P01 of X - P02 of X?
Thanks in advance.
Can you please show an example document and what the expected output would be?
Hi Christian,
X of P01 = 10
X of P02 = 8
Graph to show net value of X - 2
Thanks
That does not show the document structure. Scripted fields are limited to the scope of a single document, so if these values reside in different documents you will not be able to use scripted fields.
Apologies for late reply, hope this helps. Can I script to subtract X from different index_name in same index pattern?
"_source": {
"index_name": "P01",
},
"statistic_type": "count",
"x": 10
"_source": {
"index_name": "P02",
},
"statistic_type": "count",
"x": 2
Thanks.
No. Scripted fields require all data to be in a single document.
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.