How is it possible to print or log some variables using a groovy script for scoring? I know there are log directories, but they don't log what I print in the script.
Ok, as you said, Here is my way of doing so.
curl -XPOST "http://localhost:9200/index/type/_search" -d'
{
"size": 1,
"script_fields": {
"toTestField": {
"script": "_source.field_name.equals('key')? true : false "
}
}
}'
Change the script and Check the value of toTestField in response,
I think it is easy way to debug.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With