Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-4727

Provide an example of comparison semantics

      In http://docs.mongodb.org/manual/reference/bson-types/ it would be a lot easier for me to understand this statement if you gave an example, like 1 != "1"

      "When comparing values of different BSON types, MongoDB uses the following comparison order, from lowest to highest"

      Also, I think the docs at http://docs.mongodb.org/manual/reference/bson-types/ should be more specific about the following. I assume this is a statement about the BSON numeric types (32-bit int, 64-bit int, double) because JSON doesn't have a choice. I think a few sentences would be sufficient to explain the precedence. Is it int32 -> int64 -> double?

      "MongoDB treats some types as equivalent for comparison purposes. For instance, numeric types undergo conversion before comparison."

            Assignee:
            kay.kim@mongodb.com Kay Kim (Inactive)
            Reporter:
            mdcallag Mark Callaghan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              1 year, 25 weeks, 1 day ago