I need to get all documents where field 'status' is either empty or has the value 'active'
I tried
status:active OR (NOT status:*)
status:active OR (NOT status:[* TO *])
status:(active OR NOT *)
All of these variants don't work.
Try this one
-status:[* TO *] OR status:active
This should do the trick (ref. https://stackoverflow.com/a/35633038/13365):
status:active OR (*:* NOT status:["" TO *])
I never got the -status
versions to work.