As you can see, $and works/outputs results only when all the conditions in the array is met. i.e., in above command, the name must have small letter “e” in it and must be lexicographically greater than capital letter “C”.
In set theory, the union (denoted by ∪) of a collection of sets is the set of all distinct elements in the collection. It is one of the fundamental operations through which sets can be combined and related to each other.
Union of two sets The union of two sets A and B is the collection of points which are in A or in B or in both A and B. In symbols,
For example, if A = {1, 3, 5, 7} and B = {1, 2, 4, 6} then A ∪ B = {1, 2, 3, 4, 5, 6, 7}.
$or is a prefix operator. It takes array as it’s value. The array can contain any number of objects for the union. Mongo Shell fetches all the documents which matches any of the documents which the individual objects inside the array points to.