<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 07:38:47 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-489] Aggregation Framework: Make Indexing Requirements More Explicit</title>
                <link>https://jira.mongodb.org/browse/DOCS-489</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;This stems from a Dev chat discussion (I will paste relevant pieces in the issue) about the somewhat vague assertions regarding the use of indexes in the aggregation framework.  Rather than references to &quot;early stages&quot; etc. it would be best to be more explicit and clearly state when indexes can and cannot be used.&lt;/p&gt;</description>
                <environment></environment>
        <key id="49489">DOCS-489</key>
            <summary>Aggregation Framework: Make Indexing Requirements More Explicit</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="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="adamc">Adam Comerford</reporter>
                        <labels>
                    </labels>
                <created>Wed, 5 Sep 2012 17:42:50 +0000</created>
                <updated>Mon, 30 Oct 2023 22:02:13 +0000</updated>
                            <resolved>Thu, 13 Sep 2012 21:35:32 +0000</resolved>
                                    <version>mongodb-2.2</version>
                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="164240" author="auto" created="Thu, 13 Sep 2012 22:14:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-13T15:13:42-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: merge: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-489&quot; title=&quot;Aggregation Framework: Make Indexing Requirements More Explicit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-489&quot;&gt;&lt;del&gt;DOCS-489&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/2474334aae120beb2913ad7104e58369fb3e012e&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/2474334aae120beb2913ad7104e58369fb3e012e&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164239" author="auto" created="Thu, 13 Sep 2012 22:14:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-13T14:34:17-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-489&quot; title=&quot;Aggregation Framework: Make Indexing Requirements More Explicit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-489&quot;&gt;&lt;del&gt;DOCS-489&lt;/del&gt;&lt;/a&gt; aggregation operators and indexes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/89a51a63d9e34bee950ef5a2c23114de6148da03&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/89a51a63d9e34bee950ef5a2c23114de6148da03&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164218" author="auto" created="Thu, 13 Sep 2012 21:41:20 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-13T14:41:10-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: minor: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-489&quot; title=&quot;Aggregation Framework: Make Indexing Requirements More Explicit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-489&quot;&gt;&lt;del&gt;DOCS-489&lt;/del&gt;&lt;/a&gt; correction&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/90aa10fb684d48138891e2a76b9b783092d14bb1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/90aa10fb684d48138891e2a76b9b783092d14bb1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164212" author="auto" created="Thu, 13 Sep 2012 21:35:06 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-13T14:31:23-07:00&apos;, u&apos;email&apos;: u&apos;samk@10gen.com&apos;, u&apos;name&apos;: u&apos;Sam Kleinman&apos;}
&lt;p&gt;Message: merge: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-489&quot; title=&quot;Aggregation Framework: Make Indexing Requirements More Explicit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-489&quot;&gt;&lt;del&gt;DOCS-489&lt;/del&gt;&lt;/a&gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/07c629b76b2443a608d63e16dd73753dc82ca7a7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/07c629b76b2443a608d63e16dd73753dc82ca7a7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164211" author="auto" created="Thu, 13 Sep 2012 21:35:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-13T13:23:20-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-489&quot; title=&quot;Aggregation Framework: Make Indexing Requirements More Explicit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-489&quot;&gt;&lt;del&gt;DOCS-489&lt;/del&gt;&lt;/a&gt; aggregation operators and indexes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/197b16be1d9c40ba7617e83a20c0d0acc6887405&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/197b16be1d9c40ba7617e83a20c0d0acc6887405&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="164210" author="auto" created="Thu, 13 Sep 2012 21:35:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-09-13T12:57:44-07:00&apos;, u&apos;email&apos;: u&apos;kay.kim@10gen.com&apos;, u&apos;name&apos;: u&apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-489&quot; title=&quot;Aggregation Framework: Make Indexing Requirements More Explicit&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-489&quot;&gt;&lt;del&gt;DOCS-489&lt;/del&gt;&lt;/a&gt; aggregation operators and indexes&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/8a41773d7d909aae3e897c9e04d9832618e02d69&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/8a41773d7d909aae3e897c9e04d9832618e02d69&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="160727" author="adamc" created="Wed, 5 Sep 2012 17:54:51 +0000"  >&lt;p&gt;Specific pieces to improve:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.mongodb.org/manual/applications/aggregation/#early-filtering&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/applications/aggregation/#early-filtering&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;When placed early in a pipeline, these $match operations use suitable indexes to scan only the matching documents in a collection.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;This should be more explicit.  For example:&lt;/p&gt;

&lt;p&gt;Any early use of the $project operator will make subsequent use of indexes impossible.  However, $match, $limit, $sort, $skip (there might be others?) can be used at the start of the pipeline and essentially will be logically combined to make use of an appropriate index&lt;/p&gt;

&lt;p&gt;Another spot which could use clarification is the warning at the end of this page:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://docs.mongodb.org/manual/reference/aggregation/sort/#_S_sort&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://docs.mongodb.org/manual/reference/aggregation/sort/#_S_sort&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Warning Unless the $sort operator can use an index, in the current release, the sort must fit within memory. This may cause problems when sorting large numbers of documents.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We need to be sure people understand that a $sort after any $project or $unwind will have to be in memory, and that $sort must be at the start (or close to the start of the pipeline as described above).&lt;/p&gt;

&lt;p&gt;These are the two examples I am most familiar with, but there may be more.&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>7.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 13 Sep 2012 21:35:03 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 22 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_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>
                            11 years, 22 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>adamc</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>kay.kim@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrsc1j:</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>11267</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|hryk5r:</customfieldvalue>

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