Hi,
I wanted to write conditional statements in Scripted field.
Can i get some sample example how to return field from scripted field ?
Can i debug the conditions in scripted field ?
Thanks
Hi,
I wanted to write conditional statements in Scripted field.
Can i get some sample example how to return field from scripted field ?
Can i debug the conditions in scripted field ?
Thanks
@Varun_Patel if you're using the Painless scripting language, the following is an example of a conditional statement:
if(doc['_type'].value == 'apache') {
return true;
}
return false;
If you're going to use scripted fields, it'll be worthwhile to familiarize yourself with the Painless Scripting Language.
Currently, there isn't an interactive debugger.
@Brandon_Kobel thanks it does make sense.
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.