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

Add a note about types to $bucket's documentation

    XMLWordPrintableJSON

Details

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

    Description

      The release notes for the $bucket stage specifies that the 'boundaries' argument should contain values which are all the same type. This is slightly inaccurate, since you are allowed to mix numeric types as described in this note about bson types and sort orders. For example, [1, NumberLong(2), NumberInt(3)] is a valid specification for 'boundaries'.

      It's also probably worth mentioning that 'default' can be of a different type than the entries in 'boundaries'.

      Attachments

        Activity

          People

            jonathan.destefano@mongodb.com Jonathan DeStefano
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 12 weeks, 2 days ago