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

Document type bracketing

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • Server
    • None

    Description

      A query like {_id: {$gt: 2}} doesn't mean to find all documents with an _id field that compares greater than the number 2. Instead, it means to field documents where the _id field is a number that compares greater than 2. This implicit restriction of comparison predicates to a particular canonical type is called "type bracketing". If we don't have explicit documentation for this behavior already, then we should add some.

      See SERVER-22308 for an example of how this could cause confusion.

      Attachments

        Activity

          People

            steve.renaker@mongodb.com Steve Renaker (Inactive)
            david.storch@mongodb.com David Storch
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 45 weeks, 5 days ago