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.
progrrammer
source share