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

Comment on: "manual/aggregation.txt"

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      I am using MongoDB on Compose and I just performed an upgrade with their environment from 2.4 to 3.2.8. In doing a review of my application some grouping issues were found. What we seem to have found is that after the upgrade the order of some of the elements in some of the documents were changed (see example below), and this was causing a problem with the grouping.

      The grouping was being done on a sub-document like on $person.address for the example below. And the grouping was not combining the records where the ordering of the data did not match, even though the data itself matched. If I change the line in the grouping from $person.address to be something like:

      {street: $person.address.street, city: $person.address.city, state: $person.address.state}

      The grouping seems to start to work again.

      Thoughts?

      Source database:

      {
      _id: 1234,
      name: "my name",
      address:

      { street: "123 my street", city : "my city", state: "state" }

      }

      after the upgrade / import:
      {
      _id: 1234,
      name: "my name",
      address:

      { state: "state", street: "123 my street", city : "my city" }

      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 20 weeks ago