I am new to mongodb using atlas search for my query. I want to return document based on a condition where if the field exists it should be false if the field does not exists it should return the document based on filters. Basically return the documents where field is False or where the field doesn't exist at all. If using find we can use like this
q['active'] = {'$ne': True}
How can we achieve same using atlas search
I tried using must, mustnot, if exists nothing seems to work
Using a mustNot clause with an equals operator worked for me: