Lucene query string to match missing fields

I'm in the need to write a Lucene query string (I cannot use ES DSL unfortunately) to match all documents where a given field is missing: e.g. something like _missing_:mydoc.field. I tried the _exists_ special field, but the query _exists_:mydoc.field matches documents where mydoc.field is assigned an empty array. I need only those where the mydoc.field is not set at all.

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