<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:11:21 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-14855] Reword $sample documentation on how $sample behaves</title>
                <link>https://jira.mongodb.org/browse/DOCS-14855</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;The $sample&#160; documentation &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#behavior&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://docs.mongodb.com/manual/reference/operator/aggregation/sample/#behavior&lt;/a&gt;&#160;states the following:&lt;br/&gt;
&#8220;If all the following conditions are met,&#160;&lt;tt&gt;$sample&lt;/tt&gt;&#160;uses a pseudo-random cursor to select documents: * &lt;tt&gt;$sample&lt;/tt&gt;&#160;is the first stage of the pipeline&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;N is less than 5% of the total documents in the collection&lt;/li&gt;
	&lt;li&gt;The collection contains more than 100 documents&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;b&gt;If any of the above conditions are NOT met,&lt;/b&gt;&#160;&lt;tt&gt;&lt;b&gt;$sample&lt;/b&gt;&lt;/tt&gt;&#160;&lt;b&gt;performs a collection scan followed by a random sort to select N documents.&lt;/b&gt;&#8221;&lt;/p&gt;

&lt;p&gt;That to me sounds like if $sample comes in second stage it will perform a collection scan (not saying it actually does a collection scan, but the bold sentence make it sound like it would).&#160;&lt;br/&gt;
&#160;&lt;br/&gt;
The bold sentence above can be changed to:&lt;br/&gt;
&lt;b&gt;&quot;If any of the above conditions are NOT met, $sample will process all input documents (that come from either a preceding aggregation stage or a collection scan) followed by a random sort to select N documents&quot;&lt;/b&gt;&lt;/p&gt;</description>
                <environment></environment>
        <key id="1892545">DOCS-14855</key>
            <summary>Reword $sample documentation on how $sample behaves</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="jason.price@mongodb.com">Jason Price</assignee>
                                    <reporter username="emre.ucal@mongodb.com">Emre Ucal</reporter>
                        <labels>
                    </labels>
                <created>Thu, 7 Oct 2021 12:17:50 +0000</created>
                <updated>Mon, 13 Nov 2023 18:46:08 +0000</updated>
                            <resolved>Mon, 18 Oct 2021 17:37:15 +0000</resolved>
                                                    <fixVersion>4.0.0</fixVersion>
                    <fixVersion>4.2.0</fixVersion>
                    <fixVersion>4.4.0</fixVersion>
                    <fixVersion>5.0.0</fixVersion>
                    <fixVersion>5.1.0</fixVersion>
                    <fixVersion>Server_Docs_20231030</fixVersion>
                    <fixVersion>Server_Docs_20231106</fixVersion>
                    <fixVersion>Server_Docs_20231105</fixVersion>
                    <fixVersion>Server_Docs_20231113</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="4130178" author="xgen-internal-githook" created="Mon, 18 Oct 2021 17:35:59 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;69260375+jason-price-mongodb@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jason-price-mongodb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-14855&quot; title=&quot;Reword $sample documentation on how $sample behaves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-14855&quot;&gt;&lt;del&gt;DOCS-14855&lt;/del&gt;&lt;/a&gt; reword-sample (#6012) (#6016)&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/73e08fd865fe3948784cf08d35513c9750c415a1&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/73e08fd865fe3948784cf08d35513c9750c415a1&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4130145" author="xgen-internal-githook" created="Mon, 18 Oct 2021 17:26:18 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;69260375+jason-price-mongodb@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jason-price-mongodb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-14855&quot; title=&quot;Reword $sample documentation on how $sample behaves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-14855&quot;&gt;&lt;del&gt;DOCS-14855&lt;/del&gt;&lt;/a&gt; reword-sample (#6012) (#6015)&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;br/&gt;
Branch: v4.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/f0f0029acbb2b2adf4681a32c0b54fa1e3bfebdf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/f0f0029acbb2b2adf4681a32c0b54fa1e3bfebdf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4130066" author="xgen-internal-githook" created="Mon, 18 Oct 2021 17:10:22 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;69260375+jason-price-mongodb@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jason-price-mongodb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-14855&quot; title=&quot;Reword $sample documentation on how $sample behaves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-14855&quot;&gt;&lt;del&gt;DOCS-14855&lt;/del&gt;&lt;/a&gt; reword-sample (#6012) (#6014)&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;br/&gt;
Branch: v4.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/80548c9180a652abed3a21e674e2951d0928b285&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/80548c9180a652abed3a21e674e2951d0928b285&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4130021" author="xgen-internal-githook" created="Mon, 18 Oct 2021 16:56:39 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;69260375+jason-price-mongodb@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jason-price-mongodb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-14855&quot; title=&quot;Reword $sample documentation on how $sample behaves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-14855&quot;&gt;&lt;del&gt;DOCS-14855&lt;/del&gt;&lt;/a&gt; reword-sample (#6012) (#6013)&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;br/&gt;
Branch: v5.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/f60846a60ae1139cfd342ca52695b8744db1a346&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/f60846a60ae1139cfd342ca52695b8744db1a346&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="4129977" author="xgen-internal-githook" created="Mon, 18 Oct 2021 16:44:07 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;name&apos;: &apos;jason-price-mongodb&apos;, &apos;email&apos;: &apos;69260375+jason-price-mongodb@users.noreply.github.com&apos;, &apos;username&apos;: &apos;jason-price-mongodb&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-14855&quot; title=&quot;Reword $sample documentation on how $sample behaves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-14855&quot;&gt;&lt;del&gt;DOCS-14855&lt;/del&gt;&lt;/a&gt; reword-sample (#6012)&lt;/p&gt;

&lt;p&gt;Co-authored-by: jason-price-mongodb &amp;lt;jshfjghsdfgjsdjh@aolsdjfhkjsdhfkjsdf.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/f804a406715324b8d6d1ebb59e185d4f4c2bc178&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/f804a406715324b8d6d1ebb59e185d4f4c2bc178&lt;/a&gt;&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>5.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 Oct 2021 00:01:57 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        2 years, 16 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-11701</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_14873" key="com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker">
                        <customfieldname>External Reviewer</customfieldname>
                        <customfieldvalues>
                                    <customfieldvalue><![CDATA[christopher.harris@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>
                            2 years, 16 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>emre.ucal@mongodb.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>jason.price@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i04q8n:</customfieldvalue>

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

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

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