<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:12:19 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-15221] Indicate that ONLY specific aggregation stages an utilize indexes</title>
                <link>https://jira.mongodb.org/browse/DOCS-15221</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;In &lt;a href=&quot;https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization/#std-label-aggregation-pipeline-optimization-indexes-and-filters&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization/#std-label-aggregation-pipeline-optimization-indexes-and-filters&lt;/a&gt; the instructions are not explicit, and the resulting ambiguity can confuse users who are unsure as to why their pipeline didn&apos;t use an index.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The query planner analyzes an aggregation pipeline to determine if indexes can be used to improve pipeline performance.&lt;/p&gt;

&lt;p&gt;The following list shows some pipeline stages that can use indexes:&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This should be reworded as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The query planner analyzes an aggregation pipeline to determine if indexes from the collection targeted by the &lt;tt&gt;aggregate&lt;/tt&gt; command can be used to improve pipeline performance. Only the &lt;b&gt;first&lt;/b&gt; pipeline stage can benefit from indexes, and only if that stage is one of the following:&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="2020282">DOCS-15221</key>
            <summary>Indicate that ONLY specific aggregation stages an utilize indexes</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</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="9">Done</resolution>
                                        <assignee username="nick.villahermosa@mongodb.com">Nick Villahermosa</assignee>
                                    <reporter username="alex.bevilacqua@mongodb.com">Alex Bevilacqua</reporter>
                        <labels>
                    </labels>
                <created>Fri, 8 Apr 2022 13:33:25 +0000</created>
                <updated>Mon, 30 Oct 2023 19:55:05 +0000</updated>
                            <resolved>Thu, 20 Oct 2022 16:21:58 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due>Fri, 2 Sep 2022 00:00:00 +0000</due>
                            <votes>1</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="5049516" author="xgen-internal-githook" created="Mon, 12 Dec 2022 23:01:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nick Villahermosa&apos;, &apos;email&apos;: &apos;nick.villahermosa@mongodb.com&apos;, &apos;username&apos;: &apos;nvillahermosa-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-15221&quot; title=&quot;Indicate that ONLY specific aggregation stages an utilize indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-15221&quot;&gt;&lt;del&gt;DOCS-15221&lt;/del&gt;&lt;/a&gt; updated with initial copy and tech review input (#1974)&lt;br/&gt;
Branch: indexes-refactor&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/74287114ce4e7ce43c0a7d3bb16b0c677ddfbf17&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/74287114ce4e7ce43c0a7d3bb16b0c677ddfbf17&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4909533" author="xgen-internal-githook" created="Tue, 18 Oct 2022 13:10:21 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nick Villahermosa&apos;, &apos;email&apos;: &apos;nick.villahermosa@mongodb.com&apos;, &apos;username&apos;: &apos;nvillahermosa-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-15221&quot; title=&quot;Indicate that ONLY specific aggregation stages an utilize indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-15221&quot;&gt;&lt;del&gt;DOCS-15221&lt;/del&gt;&lt;/a&gt; updated with initial copy and tech review input (#1974) (#2025)&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/54f56d634cb745b03a5ac3a4b507ed80c5a6f9d1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/54f56d634cb745b03a5ac3a4b507ed80c5a6f9d1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4909532" author="xgen-internal-githook" created="Tue, 18 Oct 2022 13:09:40 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nick Villahermosa&apos;, &apos;email&apos;: &apos;nick.villahermosa@mongodb.com&apos;, &apos;username&apos;: &apos;nvillahermosa-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-15221&quot; title=&quot;Indicate that ONLY specific aggregation stages an utilize indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-15221&quot;&gt;&lt;del&gt;DOCS-15221&lt;/del&gt;&lt;/a&gt; updated with initial copy and tech review input (#1974) (#2023)&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/db01fd5161c10f8c1511ffee02d2418453fe74bf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/db01fd5161c10f8c1511ffee02d2418453fe74bf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4909531" author="xgen-internal-githook" created="Tue, 18 Oct 2022 13:09:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nick Villahermosa&apos;, &apos;email&apos;: &apos;nick.villahermosa@mongodb.com&apos;, &apos;username&apos;: &apos;nvillahermosa-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-15221&quot; title=&quot;Indicate that ONLY specific aggregation stages an utilize indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-15221&quot;&gt;&lt;del&gt;DOCS-15221&lt;/del&gt;&lt;/a&gt; updated with initial copy and tech review input (#1974) (#2022)&lt;br/&gt;
Branch: v6.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/7b72372e813eb67a43073d7bc373ecba11a1bcde&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/7b72372e813eb67a43073d7bc373ecba11a1bcde&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4894295" author="xgen-internal-githook" created="Tue, 11 Oct 2022 14:17:55 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Nick Villahermosa&apos;, &apos;email&apos;: &apos;nick.villahermosa@mongodb.com&apos;, &apos;username&apos;: &apos;nvillahermosa-mdb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-15221&quot; title=&quot;Indicate that ONLY specific aggregation stages an utilize indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-15221&quot;&gt;&lt;del&gt;DOCS-15221&lt;/del&gt;&lt;/a&gt; updated with initial copy and tech review input (#1974)&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/commit/74287114ce4e7ce43c0a7d3bb16b0c677ddfbf17&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/commit/74287114ce4e7ce43c0a7d3bb16b0c677ddfbf17&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4811517" author="JIRAUSER1270643" created="Thu, 8 Sep 2022 13:40:28 +0000"  >&lt;p&gt;Thanks &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=christopher.harris%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;christopher.harris@mongodb.com&quot;&gt;christopher.harris@mongodb.com&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alex.bevilacqua%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;alex.bevilacqua@mongodb.com&quot;&gt;alex.bevilacqua@mongodb.com&lt;/a&gt; for diving into this. I&apos;ll incorporate the suggested changes and submit another PR once that&apos;s done.&lt;/p&gt;</comment>
                            <comment id="4811361" author="christopher.harris" created="Thu, 8 Sep 2022 12:52:49 +0000"  >&lt;p&gt;To clear up the &quot;not only the first stage can benefit&quot; piece, perhaps wording along these lines?&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;The leading stages in an aggregation pipeline can benefit from indexes, but usage of an index requires that the first stage (after optimizations) is one of the following:&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;And then to help address the fact that other stages later in the pipeline can also use indexes, perhaps append some additional text afterwards along the lines of:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Furthermore, other aggregation stages that retrieve new data from collections later in the pipeline are also eligible for index usage. &#160;These include:&lt;/p&gt;

&lt;ul&gt;
	&lt;li&gt;$lookup&lt;/li&gt;
	&lt;li&gt;...&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;</comment>
                            <comment id="4811313" author="alex.bevilacqua" created="Thu, 8 Sep 2022 12:31:14 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=christopher.harris%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;christopher.harris@mongodb.com&quot;&gt;christopher.harris@mongodb.com&lt;/a&gt;, how would you recommend adjusting the documentation? The information shared is extremely useful, however based on the nuances you&apos;ve described it might be best if there were something actionable that could be applied to the current proposed changes in &lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/pull/1774/files&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/pull/1774/files&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4809625" author="christopher.harris" created="Wed, 7 Sep 2022 20:52:56 +0000"  >&lt;p&gt;Hmm, this section of the documentation might be particularly tricky to get right.&#160;&lt;/p&gt;

&lt;p&gt;To attempt to help clear up some of the initial confusion here - the clarification that index eligibility is predicated on the first stage of the pipeline is&#160;&lt;em&gt;not&lt;/em&gt; a claim that using an index can&#160;&lt;em&gt;only&lt;/em&gt; benefit the first stage of the pipeline. So the suggested text in the description of &quot;&lt;em&gt;Only the first pipeline stage can benefit from indexes&lt;/em&gt;&quot; is &lt;b&gt;not&lt;/b&gt; correct. A simple example of this could be a pipeline that consists of [ $match, $sort, $group ]. If an appropriate index is present, then it could be used to do all of the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;Efficiently identify the relevant data for the $match stage&lt;/li&gt;
	&lt;li&gt;Find the data in sorted order for the $sort stage&lt;/li&gt;
	&lt;li&gt;Return all of the field values needed to execute the $group stage (eg a covered query)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;So generally speaking, index eligibility is determined by the first stage of the pipeline but usage of the index can benefit subsequent stages. What we&apos;re probably trying to clarify here is that a user can&apos;t, for example, perform some transformation of their data in the first stages of the pipeline and then expect the database to be able to use an index to service a $match or $sort that is found at the end of their pipeline.&lt;/p&gt;

&lt;p&gt;There&apos;s a bunch of nuance here though when it comes to &quot;first&quot; and when it comes to explicitly listing the stages. The two things that come to mind are:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;As Alex (and the target docs page itself as it just so happens) mentioned - the database will reorder and coalesce stages. So the first stage of the pipeline when the database checks for index eligibility may be different than what the user actually wrote/executed. This is specifically done to allow the system to execute aggregations more efficiently (which often means attempting to use an index) so it&apos;s nothing to be worried or concerned about, but it certainly changes what &quot;first&quot; might mean.&lt;/li&gt;
	&lt;li&gt;It is strictly not true that there are never subsequent pipeline stages that can separately use an index. The &apos;obvious&apos; ones here are $lookup, $graphLookup, and $unionWith. All of those will definitely attempt to use indexes AFAIK, and both the current documentation and the changes currently suggested in this ticket don&apos;t address that. I&apos;d recommend trying to do&#160;&lt;em&gt;something&lt;/em&gt; here. (From an architectural/implementation perspective, these aggregation stages represent the &quot;first&quot; part of a new data source retrieval in the overall aggregation pipeline, so that word kind of still applies here.&#160; But that&apos;s way too much of a nuanced/implementation detail to surface in the docs I think).&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="4808853" author="JIRAUSER1270643" created="Wed, 7 Sep 2022 16:55:05 +0000"  >&lt;p&gt;The second statement is about $group using an index for optimization. If the $sort comes first, doesn&apos;t that invalidate &quot;$group can potentially use an index...&quot;?&lt;/p&gt;

&lt;p&gt;Regarding reordering, I don&apos;t see $group mentioned in the linked article, and it looks like $sort is only moved in relation to $match, not $group. You&apos;d still have:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;$sort the fields to group by&lt;/li&gt;
	&lt;li&gt;$group the fields, using an index to optimize&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Just trying to get this right.&lt;/p&gt;</comment>
                            <comment id="4808739" author="alex.bevilacqua" created="Wed, 7 Sep 2022 16:28:57 +0000"  >&lt;blockquote&gt;&lt;p&gt;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt;&#160;can use an index if&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt;&#160;is not preceded by a&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/#mongodb-pipeline-pipe.-project&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$project&lt;/tt&gt;&lt;/a&gt;,&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/unwind/#mongodb-pipeline-pipe.-unwind&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$unwind&lt;/tt&gt;&lt;/a&gt;, or&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt;&#160;stage.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think the current guidance is misleading. The initial $sort CAN utilize an index if it is the FIRST stage of the pipeline, which this ticket is trying to clarify. I believe part of the current documentation might stem from the &lt;a href=&quot;https://www.mongodb.com/docs/manual/core/aggregation-pipeline-optimization/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;pipeline optimizations&lt;/a&gt; that can reorder stages under certain circumstances.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt;&#160;can potentially use an index to find the first document in each group if:&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt;&#160;is preceded by&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt;&#160;that sorts the field to group by, and...&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The sentence reads &quot;&lt;em&gt;if &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt;&#160;is preceded by&#160;&lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt;&quot;&lt;/em&gt;, so in this case the $sort would still come first &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;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=christopher.harris%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;christopher.harris@mongodb.com&quot;&gt;christopher.harris@mongodb.com&lt;/a&gt; can you give &lt;a href=&quot;https://github.com/10gen/docs-mongodb-internal/pull/1774/files&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/docs-mongodb-internal/pull/1774/files&lt;/a&gt; a quick look to make sure the appropriate messaging is being provided via this ticket?&lt;/p&gt;</comment>
                            <comment id="4808065" author="JIRAUSER1270643" created="Wed, 7 Sep 2022 14:18:25 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alex.bevilacqua%40mongodb.com&quot; class=&quot;user-hover&quot; rel=&quot;alex.bevilacqua@mongodb.com&quot;&gt;alex.bevilacqua@mongodb.com&lt;/a&gt;, need a quick tech review: &quot;only the first pipeline stage&quot; is at odds with the documented behavior for the $group and $sort stages. Is that documentation incorrect? I haven&apos;t yet gone through enough of the tech training to rely on my own testing for this.&lt;/p&gt;

&lt;p&gt;&amp;gt; &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt; can use an index if &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt; is not preceded by a &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/project/#mongodb-pipeline-pipe.-project&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$project&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/unwind/#mongodb-pipeline-pipe.-unwind&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$unwind&lt;/tt&gt;&lt;/a&gt;, or &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt; stage.&lt;/p&gt;

&lt;p&gt;(Indicates it can be preceded by another type of stage, and wouldn&apos;t be first)&lt;/p&gt;

&lt;p&gt;&amp;gt; &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt; can potentially use an index to find the first document in each group if: &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/group/#mongodb-pipeline-pipe.-group&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$group&lt;/tt&gt;&lt;/a&gt; is preceded by &lt;a href=&quot;https://www.mongodb.com/docs/manual/reference/operator/aggregation/sort/#mongodb-pipeline-pipe.-sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;&lt;tt&gt;$sort&lt;/tt&gt;&lt;/a&gt; that sorts the field to group by, and...&lt;/p&gt;

&lt;p&gt;(specifically requires that it isn&apos;t the first stage)&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>12.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 7 Sep 2022 14:18:25 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 8 weeks, 2 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_14876" key="com.atlassian.jira.plugin.system.customfieldtypes:userpicker">
                        <customfieldname>Docs Reviewer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>joseph.dougherty@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-11701</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10040" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Estimate</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10041"><![CDATA[Extra Small]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_14873" key="com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker">
                        <customfieldname>External Reviewer</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[alex.bevilacqua@mongodb.com]]></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>
                            1 year, 8 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>alex.bevilacqua@mongodb.com</customfieldvalue>
            <customfieldvalue>christopher.harris@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>nick.villahermosa@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0qgh3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i09fp8:</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|i0q2mf:</customfieldvalue>

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