{ "query": { "bool" : { "filter" : { "script" : { "script" : { "inline": "params._source.text_content==''" , "lang": "painless" } } } } } }