The script fields feature in Elasticsearch gives user the ability to return a script evaluation for each hit-according to the values taken from different fields. Script fields can work on temporary fields that won't be stored, and can return the final evaluation of the script as a custom value. Script fields can also access a source document from the index and extract specific elements.In this article, we provide a short tutorial on the use of script fields and we also look at the basics of Elasticsearch logging during script execution.