<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:57:10 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[DOCS-8887] Comment on: &quot;manual/aggregation.txt&quot;</title>
                <link>https://jira.mongodb.org/browse/DOCS-8887</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;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.  &lt;/p&gt;

&lt;p&gt;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:&lt;/p&gt;
{street: $person.address.street, city: $person.address.city, state: $person.address.state}
&lt;p&gt;The grouping seems to start to work again.&lt;/p&gt;

&lt;p&gt;Thoughts?&lt;/p&gt;

&lt;p&gt;Source database:&lt;/p&gt;

&lt;p&gt;{&lt;br/&gt;
  _id: 1234,&lt;br/&gt;
  name: &quot;my name&quot;,&lt;br/&gt;
  address: &lt;/p&gt;
{
    street: &quot;123 my street&quot;,
    city : &quot;my city&quot;,
    state: &quot;state&quot;
  }
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;after the upgrade / import:&lt;br/&gt;
{&lt;br/&gt;
  _id: 1234,&lt;br/&gt;
  name: &quot;my name&quot;,&lt;br/&gt;
  address: &lt;/p&gt;
{
    state: &quot;state&quot;,
    street: &quot;123 my street&quot;,
    city : &quot;my city&quot;
  }
&lt;p&gt;}&lt;/p&gt;</description>
                <environment>Mongodb 3.2.8 upgraded from 2.4 on Compose with Mongoose.&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;https://docs.mongodb.com/manual/aggregation/&quot;&gt;https://docs.mongodb.com/manual/aggregation/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36&lt;br/&gt;
*Referrer*: &lt;a href=&quot;https://www.mongodb.com/contact&quot;&gt;https://www.mongodb.com/contact&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 2400 x 1350&lt;br/&gt;
</environment>
        <key id="319468">DOCS-8887</key>
            <summary>Comment on: &quot;manual/aggregation.txt&quot;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="5">Cannot Reproduce</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="xgen-internal-docs">Docs Collector User</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Wed, 28 Sep 2016 16:20:15 +0000</created>
                <updated>Wed, 11 Jan 2017 21:46:59 +0000</updated>
                            <resolved>Wed, 28 Sep 2016 18:06:39 +0000</resolved>
                                                    <fixVersion>01112017-cleanup</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="1395937" author="ravind.kumar" created="Wed, 28 Sep 2016 18:06:39 +0000"  >&lt;p&gt;Hello,&lt;/p&gt;

&lt;p&gt;Thank you for filing a DOCS ticket.&lt;/p&gt;

&lt;p&gt;The Documentation project is primarily for addressing issues with the MongoDB documentation. While your question relates to aggregation, the specific issue you are referencing is likely better addressed by our free community support engineers in the &lt;a href=&quot;https://groups.google.com/forum/#!forum/mongodb-user&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;MongoDB Google Group&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;As far as the ordering of the subdocument after import, JSON only preserves the order of array values - any other objects are generally unordered. So, while after import the subdocument order has changed, you could still access the subdocuments in the same way - &lt;tt&gt;address.state&lt;/tt&gt; returns &quot;state&quot; in both the original and imported documents.&lt;/p&gt;

&lt;p&gt;This shouldn&apos;t make a difference in aggregation - without seeing your aggregation query its hard to say why something changed. It is possible that you are simply seeing the result of major changes in MongoDB&apos;s aggregation framework, given the number of versions jumped. &lt;/p&gt;

&lt;p&gt;I hope this is of some help to you - our community support engineers can likely provide a more detailed technical overview of the issue. I would recommend providing the aggregation query to them, redacting or renaming any sensitive information such as field names or values. If during the course of discussions it becomes apparent that documentation changes are needed to better clarify the subject matter, we would be happy to address that. Simply create a new DOCS ticket, linking to the thread in the user group.&lt;/p&gt;

&lt;p&gt;Thank you,&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 28 Sep 2016 17:50:27 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        7 years, 20 weeks ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>jess.mokrzecki@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            7 years, 20 weeks ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-docs</customfieldvalue>
            <customfieldvalue>ravind.kumar</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrmhhz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hsq8rj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrzkz3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                </customfields>
    </item>
</channel>
</rss>