How to search for documents where field doesn't exist?

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html#find-docs-null-values shows how to find a document where the field contains [] or null. But how can I search for documents where the field doesn't exist at all on the document?

So if the document contains that field but it is [] or null, the search should treat that document as if the field exists (and not include it in the results).

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.