Debugging groovy script elasticsearch

How can I print or write some variables using groovy script for scoring? I know that there are log directories, but they do not log what I print in the script.

+7
debugging groovy elasticsearch
source share
1 answer

Well, as you said, here is my way to do this.

curl -XPOST "http://localhost:9200/index/type/_search" -d' { "size": 1, "script_fields": { "toTestField": { "script": "_source.field_name.equals('key')? true : false " } } }' 

Modify the script and check the toTestField value in response,

I think this is an easy way to debug.

+2
source share

All Articles