https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html1
2
3
4
5
6GET /search_data/template/_search
{
"query": {
"exists" : { "field" : "gid" }
}
}
There isn’t a missing query. Instead use the exists query inside a must_not clause as follows:1
2
3
4
5
6
7
8
9
10GET /search_data/template/_search
{
"query": {
"bool": {
"must_not": {
"exists" : { "field" : "gid" }
}
}
}
}