<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 06:00:16 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>[SERVER-64410] Investigate whether we need to sort on searchScore when storedSource is true in $search</title>
                <link>https://jira.mongodb.org/browse/SERVER-64410</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;In a sharded environment, we currently add a sort while merging as part of the idLookup stage. However, idLookup is omitted when the storedSource flag is set on the search query, so the results may be merged in a different order. If users expect this implied sort, this could be considered a bug.&lt;/p&gt;

&lt;p&gt;It is also worth noting that this blocks running stages in parallel on the shards after the idLookup. If we add this to storedSource, those queries could take a performance hit.&lt;/p&gt;</description>
                <environment></environment>
        <key id="1998636">SERVER-64410</key>
            <summary>Investigate whether we need to sort on searchScore when storedSource is true in $search</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.mongodb.org/images/icons/priorities/critical.svg">Critical - P2</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="13201">Fixed</resolution>
                                        <assignee username="ted.tuckman@mongodb.com">Ted Tuckman</assignee>
                                    <reporter username="ted.tuckman@mongodb.com">Ted Tuckman</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Mar 2022 15:47:51 +0000</created>
                <updated>Sun, 29 Oct 2023 21:41:16 +0000</updated>
                            <resolved>Mon, 28 Mar 2022 13:07:33 +0000</resolved>
                                                    <fixVersion>4.4.14</fixVersion>
                    <fixVersion>6.0.0-rc0</fixVersion>
                    <fixVersion>5.3.1</fixVersion>
                    <fixVersion>5.0.7</fixVersion>
                                                        <votes>0</votes>
                                    <watches>9</watches>
                                                                                                                <comments>
                            <comment id="4467534" author="xgen-internal-githook" created="Fri, 8 Apr 2022 14:23:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/de31fa9031724250da584e34ef70e5fefddb1094&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/de31fa9031724250da584e34ef70e5fefddb1094&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4467533" author="xgen-internal-githook" created="Fri, 8 Apr 2022 14:23:34 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/30c6b3d450168740ef59fa026ba2e1b86876fd01&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/30c6b3d450168740ef59fa026ba2e1b86876fd01&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4438317" author="xgen-internal-githook" created="Mon, 28 Mar 2022 12:45:37 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/b977129dc70eed766cbee7e412d901ee213acbda&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/b977129dc70eed766cbee7e412d901ee213acbda&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4438316" author="xgen-internal-githook" created="Mon, 28 Mar 2022 12:45:25 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/6b4263a286cd2ddc15515a9d04a888314b06650c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/6b4263a286cd2ddc15515a9d04a888314b06650c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4437400" author="xgen-internal-githook" created="Sun, 27 Mar 2022 19:04:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;/p&gt;

&lt;p&gt;(cherry-picked from commit 3b8aa12e9d9b82e5f8419e53578bfc6bde20114d)&lt;br/&gt;
Branch: v5.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1625b8f241a12cdca16b51b480f5c78ce1802646&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1625b8f241a12cdca16b51b480f5c78ce1802646&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4437398" author="xgen-internal-githook" created="Sun, 27 Mar 2022 19:01:09 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;/p&gt;

&lt;p&gt;(cherry-picked from commit 3c4418bf1f3338d95060a78422b7d6051337131d)&lt;br/&gt;
Branch: v5.3&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/125708fe12964c79b7d5d48a7fe8840fc845dc01&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/125708fe12964c79b7d5d48a7fe8840fc845dc01&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4436640" author="xgen-internal-githook" created="Sat, 26 Mar 2022 02:23:17 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/3b8aa12e9d9b82e5f8419e53578bfc6bde20114d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/3b8aa12e9d9b82e5f8419e53578bfc6bde20114d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4436639" author="xgen-internal-githook" created="Sat, 26 Mar 2022 02:23:14 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;Ted Tuckman&apos;, &apos;email&apos;: &apos;ted.tuckman@mongodb.com&apos;, &apos;username&apos;: &apos;TedTuckman&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-64410&quot; title=&quot;Investigate whether we need to sort on searchScore when storedSource is true in $search&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-64410&quot;&gt;&lt;del&gt;SERVER-64410&lt;/del&gt;&lt;/a&gt; Add ability to defer merge sort in pipeline&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/10gen/mongo-enterprise-modules/commit/3c4418bf1f3338d95060a78422b7d6051337131d&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/10gen/mongo-enterprise-modules/commit/3c4418bf1f3338d95060a78422b7d6051337131d&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4424568" author="doug.tarr" created="Mon, 21 Mar 2022 17:34:28 +0000"  >&lt;p&gt;I&apos;d recommend this be a P2 as this makes storedSource not work correctly in a sharded environment.&lt;/p&gt;</comment>
                            <comment id="4424509" author="kevin.rosendahl" created="Mon, 21 Mar 2022 17:18:19 +0000"  >&lt;p&gt;We definitely still need to sort on searchScore with storedSource, that&apos;s the $search contract (results ordered by score descending). I don&apos;t think anything about storedSource changes that.&lt;/p&gt;

&lt;p&gt;What we should investigate in the perf spike later is whether or not we can omit &lt;em&gt;mongot&lt;/em&gt; returning the results in sorted order &lt;em&gt;if and only if&lt;/em&gt; there is a stage later in the pipeline that would make that sort order not observable.&lt;/p&gt;

&lt;p&gt;But for today, we should definitely add the merge sort back in when storedSource is true.&lt;/p&gt;

&lt;p&gt;cc &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=alexander.lukyanchikov&quot; class=&quot;user-hover&quot; rel=&quot;alexander.lukyanchikov&quot;&gt;alexander.lukyanchikov&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4424321" author="JIRAUSER1254387" created="Mon, 21 Mar 2022 16:37:21 +0000"  >&lt;p&gt;Should we put this in the perf spike?&lt;/p&gt;</comment>
                            <comment id="4423747" author="JIRAUSER1254387" created="Mon, 21 Mar 2022 14:27:17 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=evan.plotkin&quot; class=&quot;user-hover&quot; rel=&quot;evan.plotkin&quot;&gt;evan.plotkin&lt;/a&gt; and &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=kevin.rosendahl&quot; class=&quot;user-hover&quot; rel=&quot;kevin.rosendahl&quot;&gt;kevin.rosendahl&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10420">
                    <name>Backports</name>
                                            <outwardlinks description="backported by">
                                                        </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <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_18555" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname># of Sprints</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_12450" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                        <customfieldname>Backport Requested</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23140"><![CDATA[v5.3]]></customfieldvalue>
    <customfieldvalue key="21777"><![CDATA[v5.0]]></customfieldvalue>
    <customfieldvalue key="18953"><![CDATA[v4.4]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10011"><![CDATA[Minor Change]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 21 Mar 2022 14:27:17 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        1 year, 43 weeks, 5 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_17050" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Downstream Team Attention</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="16941"><![CDATA[Not Needed]]></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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            1 year, 43 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>doug.tarr@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>kevin.rosendahl@mongodb.com</customfieldvalue>
            <customfieldvalue>marcus.eagan@mongodb.com</customfieldvalue>
            <customfieldvalue>ted.tuckman@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0mr13:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|i05sek:</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_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_22250" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Special Downgrade Instructions Required</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="23343"><![CDATA[Not Needed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="5887">QO 2022-04-04</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_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i0md6f:</customfieldvalue>

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