Description
I couldn't find any documentation on how mixed types compare in mongo queries. For example, if a document has
{ a: 1 }, does the query
{ a: NumberLong(1) }find it? I figured out by experiment that the type does not seem to matter, but would like some page to state the precise rules.
E.g. what about $gt, $ne, etc.? Does a boolean/numeric comparison ever return true? How about string/numeric?
Most of this is pretty straightforward and intuitive, but it needs to be specified somewhere.