<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:05:20 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-12475] Missing aggregation stages</title>
                <link>https://jira.mongodb.org/browse/DOCS-12475</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;h2&gt;&lt;a name=&quot;Description&quot;&gt;&lt;/a&gt;Description&lt;/h2&gt;

&lt;p&gt;Hi!&lt;/p&gt;

&lt;p&gt;This page &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#sort-operator-and-performance&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#sort-operator-and-performance&lt;/a&gt; has a list of operators that should be used before using `$sort` at the bottom section of the page, namely `$project`, `$unwind`, and `$group`&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt; pointed out that this list is incomplete, when she took a look at our in-person training, which is largely based on the documentation.&lt;/p&gt;

&lt;p&gt;Making this ticket to bring attention to this. Is there a definitive list that should be put on the documentation page? I would love to know, so that I can also update the in-person training accordingly.&lt;/p&gt;

&lt;p&gt;Thank you!&lt;/p&gt;
&lt;h2&gt;&lt;a name=&quot;Scopeofchanges&quot;&gt;&lt;/a&gt;Scope of changes&lt;/h2&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;del&gt;Investigate performance relationships between &lt;tt&gt;$sort&lt;/tt&gt; and other aggregation stages in context of index usage&lt;/del&gt;&lt;/li&gt;
	&lt;li&gt;&lt;del&gt;Document any missing operators&lt;/del&gt;&lt;/li&gt;
	&lt;li&gt;&lt;tt&gt;$sort&lt;/tt&gt; can only use indexes if it is the &lt;b&gt;first&lt;/b&gt; pipeline stage &lt;b&gt;or&lt;/b&gt; if after all &lt;tt&gt;$match&lt;/tt&gt; stages.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="697785">DOCS-12475</key>
            <summary>Missing aggregation stages</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="13203">Gone away</resolution>
                                        <assignee username="naomi.pentrel@mongodb.com">Naomi Pentrel</assignee>
                                    <reporter username="yulia.genkina@mongodb.com">Yulia Genkina</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Feb 2019 19:24:27 +0000</created>
                <updated>Mon, 30 Oct 2023 20:45:57 +0000</updated>
                            <resolved>Mon, 16 Aug 2021 12:53:36 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="4025003" author="asya" created="Thu, 26 Aug 2021 19:00:02 +0000"  >&lt;p&gt;yep, fixed.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="4001039" author="naomi.pentrel" created="Mon, 16 Aug 2021 12:53:36 +0000"  >&lt;p&gt;I believe this is now fixed - if anyone disagrees please reopen this ticket.&lt;/p&gt;</comment>
                            <comment id="3972794" author="naomi.pentrel" created="Fri, 30 Jul 2021 14:25:51 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt;&#160;can you confirm this is solved now with our previous changes to &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#-sort-operator-and-performance&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/operator/aggregation/sort/#-sort-operator-and-performance&lt;/a&gt;&#160;?&#160;&lt;/p&gt;</comment>
                            <comment id="2153246" author="charlie.swanson" created="Fri, 15 Feb 2019 15:18:05 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=ravind.kumar&quot; class=&quot;user-hover&quot; rel=&quot;ravind.kumar&quot;&gt;ravind.kumar&lt;/a&gt; that&apos;s correct.&lt;/p&gt;</comment>
                            <comment id="2150390" author="ravind.kumar" created="Fri, 15 Feb 2019 00:52:44 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt; - just to confirm, no other stages could occur between &lt;tt&gt;$match&lt;/tt&gt; and &lt;tt&gt;$sort&lt;/tt&gt; , but you can have multiple &lt;tt&gt;$match&lt;/tt&gt; stages as long as they are &lt;b&gt;all&lt;/b&gt; before &lt;tt&gt;$sort&lt;/tt&gt;? e.g. you could have &lt;tt&gt;n&lt;/tt&gt; &lt;tt&gt;$match&lt;/tt&gt; stages followed by &lt;tt&gt;$sort&lt;/tt&gt;, but if there is an interleaving stage of any other type, &lt;tt&gt;$sort&lt;/tt&gt; cannot use an index.&lt;/p&gt;</comment>
                            <comment id="2150354" author="asya" created="Thu, 14 Feb 2019 23:37:55 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson&quot;&gt;charlie.swanson&lt;/a&gt; sounds about right.&lt;/p&gt;</comment>
                            <comment id="2150319" author="charlie.swanson" created="Thu, 14 Feb 2019 22:46:10 +0000"  >&lt;p&gt;I think that list is just $match? &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt; do you know of any others? After doing a brief code exploration it looks like it must be first or after all $matches.&lt;/p&gt;</comment>
                            <comment id="2150297" author="ravind.kumar" created="Thu, 14 Feb 2019 22:33:32 +0000"  >&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;It&apos;d be easier to enumerate stages that can come before $sort for sort to still use an index...&#160;&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;
&lt;p&gt;If that list of stages exist, I&apos;d be happy to add it to the document &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=charlie.swanson%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;charlie.swanson@mongodb.com&quot;&gt;charlie.swanson@mongodb.com&lt;/a&gt; for input.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="2150283" author="asya" created="Thu, 14 Feb 2019 22:20:23 +0000"  >&lt;p&gt;I don&apos;t think you should be enumerating stages here.&lt;/p&gt;

&lt;p&gt;It&apos;s likely always going to be incomplete then.   It&apos;d be easier to enumerate stages that can come before $sort for sort to still use an index... &lt;/p&gt;</comment>
                            <comment id="2150006" author="ravind.kumar" created="Thu, 14 Feb 2019 19:27:16 +0000"  >&lt;p&gt;We&apos;re very dependent on server providing guidance for performance related behavior as mentioned. If &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=asya&quot; class=&quot;user-hover&quot; rel=&quot;asya&quot;&gt;asya&lt;/a&gt; or someone else on the server team can provide us resources for making that list more complete, we can update the documentation from there. Worth mentioning that we would probably need to consider behavior specific to certain versions of MongoDB.&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>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 14 Feb 2019 19:27:16 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 23 weeks, 6 days 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-1769</customfieldvalue>
                        </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>emet.ozar@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            2 years, 23 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>asya.kamsky@mongodb.com</customfieldvalue>
            <customfieldvalue>charlie.swanson@mongodb.com</customfieldvalue>
            <customfieldvalue>naomi.pentrel@mongodb.com</customfieldvalue>
            <customfieldvalue>ravind.kumar</customfieldvalue>
            <customfieldvalue>yulia.genkina@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hunlcf:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hudd4n:</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_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="4949">ServerDocs2020: Apr20 -  Apr27</customfieldvalue>
    <customfieldvalue id="4977">ServerDocs2020: Apr27 -  May4</customfieldvalue>
    <customfieldvalue id="5002">ServerDocs2020: May4 -  May11</customfieldvalue>
    <customfieldvalue id="5045">ServerDocs2020: May11 -  May18</customfieldvalue>
    <customfieldvalue id="5061">ServerDocs2020: May18 -  May25</customfieldvalue>
    <customfieldvalue id="5099">ServerDocs2020: May25 -  Jun1</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10555" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.1</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|hun7lr:</customfieldvalue>

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