How to use bool query with both "missing" and exists?

How would I format a bool query to use both the "exists" and the "missing" (must_not & exists) combined in a single query?

I'm trying to stay away from deprecated filters...

In that same note, how exactly does the missing query work? I have a large dataset and I want to perform an operation on new data every day to add a few new fields to each record. If I have 99.9% (exaggerating for the sake of example) with the new fields and only .1% is new, would it still take a long time filtering through everything?


the filters are not deprecated, they have been moved. If you use a bool query, you can now set a filter clause inside of that

"bool": {
  "must": [  ... ],
  "should": [  ... ],
  "must_not": [  ... ],
  "filter" : [ ... ]

See the docs on that

Here is some documentation how exists/missing works under the hood (by also indexing the field names and not only the values): (and here is the PR adding it