If I want to return all the documents which have an empty property (IMG) I can do something like that:
GET something/_search/?
{
"query": {
"term": {"IMG": ""}
}
}
It works because IMG is a keyword. If I want the exact inverse, which means get all the documents where IMG is not null, what should I type? Is there an "inverse" of term query?
In other words, is there a way with Elasticsearch to get documents where a property is not empty?