Exclusive $AND vs multiple filter in data explorer Atlas

So, as explained by Julia in chapter 4 lecture query operators - logic, minute 3:48,
entering multiple filter in data explorer Atlas actually performs $OR ?

Julia was explaining how two queries can output same result. No such thing said by Julia like you understood. Or maybe I didn’t. Thanks


she literally said using consecutive $or without explicit $and returns the correct airport but the wrong airplane, did you bother to check the video I even wrote specific subject and minutes.

Thanks for replying though, 92 views in 2 days, not 1 reply except from you.
I hope we both gain something from this discussions.

Please read carefully the following thread:

1 Like

She said this to explain for that specific purpose because it was not fulfilling our requirement.

$or means get me any result from my query does not matter all of it or not.

$and means get me specific result from my query and must follows my comparison operators.

In reality, comparison operators behaves just like basic logic gates. Follow this link to refresh your school memories: Basic Logic Gates - Types, Functions, Truth Table, Boolean Expressions

I would highly recommend to put lecture/quiz comparison values in the truth table to get deep understanding. Thanks

multiple filter on data explorer Atlas still behaves like AND,
but for operator $OR used more than once only runs the last $OR filter?

Yes. Examples:

{ "last_name" : "Juneau" , "first_name" : "Steeve" }

is equivalent to:

{ "$and" : 
     { "last_name" : "Juneau" } ,
     { "first_name" : "Steeve" }

Equivalent means that in both cases the 2 conditions must be true.

Yes and no. But not only for $or but for anything else. I provided a link to another thread that explain it. You really should read it. Example:

{ "user_id" : 1 , "user_id" : 2 , "user_id" : 3 }

is equivalent to

{ "user_id" : 3 }

because the 3rd instance of the key user_id overwrites the others. Just like

{ "$or" : condition_one , "$or" : condition_two }

is equivalent to

{ "$or" : condition_two }

Not because it is $or but because $or is repeated.


I’ve read through your first quoted reply “A query is a JSON etc etc…”
and just want to make sure if I understand correctly.
Thank you for taking the time responding, and your second explanation using “user_id” is even clearer. This should be on the lecture!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.