我需要获取字段“状态”为空或值为“活动”的所有文档
我试过了
status:active OR (NOT status:*)
status:active OR (NOT status:[* TO *])
status:(active OR NOT *)
所有这些变体都不起作用。
试试这个
-status:[* TO *] OR status:active
尝试以下查询。
-(status:['' TO *] OR -status:active)
这应该可以解决问题(参考https://stackoverflow.com/a/35633038/13365):
status:active OR (*:* NOT status:["" TO *])
我从来没有让这些-status
版本工作。