Details
-
Task
-
Resolution: Won't Do
-
Major - P3
-
None
Description
Description
This is a follow-up to SERVER-31876 and HELP-13248.
It is asserted that "$ne is just $not" which is not clear from current documentation. Users see some confusing behavior, but it's not clear what the best change to suggest is. Hopefully this can be determined with some follow-up.
Some notes from HELP-13248:
https://docs.mongodb.com/manual/tutorial/query-array-of-documents/index.html#specify-a-query-condition-on-a-field-embedded-in-an-array-of-documents
"has at least one embedded document"
https://docs.mongodb.com/manual/reference/operator/query/ne/index.html#op._S_ne
"$ne selects the documents where the value of the field is not equal to the specified value. This includes documents that do not contain the field."
https://docs.mongodb.com/manual/reference/operator/query/not/
"$not performs a logical NOT operation on the specified <operator-expression> and selects the documents that do not match the <operator-expression>. This includes documents that do not contain the field."
"the $not operator only affects other operators and cannot check fields and documents independently. So, use the $not operator for logical disjunctions and the $ne operator to test the contents of fields directly."