In the Kibana UI, I have created a new scriping field named "CPU_UTL_PERCNT" and also added the following script against the field for calculation:
doc['metric_value_number.util'].value
Then I selected the field to perform a search. I am getting the following error now: Discover: Field [metric_value_number.util] used in expression does not exist in mappings
Could any one please check it up and advice me on how to access the util field based on the above mapping?
Thanks for your reply. But, It did not work. Now, I am getting the following error now: Discover: Field [metric_value_number.fields.util] used in expression does not exist in mappings
I have received the following in the error stack trace:
"Error during search with inline script [doc['metric_value_number.fields.util'].value] using lang [expression]","caused_by":{"type":"expression_script_compilation_exception","reason":"Field [metric_value_number.fields.util] used in expression does not exist in mappings"}}}]}}
It seems you are attempting to use a mult_field type but you are defining it as a long. Not sure why in this case you are using a multi_field. Why not simply use:
"metric_value_number": { "type": "long" }.
If you are using a multi-field type, it should look like the following:
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.