I have a use case where I need to find records where a field is both missing or contains a specific value. Anyone have any idea how to do this? I can use the must_not with exists to find the fields that are missing and I can use the should with match to find the records with the value I am looking for. I cannot figure out how to combine these into a single query.
In the sample below, I want to find records with a 'lastname' of 'Smith' or where the last name is missing.
In other words, I want to return both records 1 and 3.