To expand on this, since I recently ran into the very same issue. If you have a search time field extraction and an event that should contain the field but doesn't, you can't do a search for fieldname="" because the field doesn't get extracted if it's not there.
But if you search for events that should contain the field and want to specifically find events that don't have the field set, the following worked for me (the index/sourcetype combo should always have fieldname set in my case):
index=myindex sourcetype=mysourcetype NOT fieldname=*
All of which is a long way of saying make sure you include search criteria that should always find events with that field set.
... View more