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.
1 Answer
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.
2 Comments
Jayni
Thank you. It isn't the easiest way. I expectet it to be simpler, but it will work.
progrrammer
Yaa, I do it like this, And I feel easy doing this.