<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:00:08 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-10250] Comment on: &quot;manual/reference/operator/projection/positional.txt&quot;</title>
                <link>https://jira.mongodb.org/browse/DOCS-10250</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;&quot;Both the $ operator and the $elemMatch operator project a subset of elements from an array based on a condition.&quot;&lt;/p&gt;

&lt;p&gt;This sentence reads like the $ operator will project multiple elements into the result, if more than one element of the array is matched by the query document. While one element is a subset it gives the impression that the operators could project multiple elements. The quoted sentence seems ambiguous and feels to me like it contradicts the first paragraph where it very clearly states the $ and $elemMatch only project the first element. &lt;/p&gt;

&lt;p&gt;The page about the $elemMatch projection operator has the same formulation.&lt;/p&gt;

&lt;p&gt;&quot;The following query will return any embedded documents inside a grades array that have a mean of greater than 70 and a grade of greater than 90.&quot;&lt;/p&gt;

&lt;p&gt;I think this sentence is just factually wrong. The query below will only return the first document inside the grades array which matches the query.&lt;/p&gt;

&lt;p&gt;Unless I misunderstood how those operators work, clarifying some of the documentation would help others who are looking for a way to filter an array in the projected result. From what I understand the correct way is to use aggregation if you want a result which filters an array.&lt;/p&gt;
</description>
                <environment>&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/projection/positional/#proj._S_&quot;&gt;https://docs.mongodb.com/manual/reference/operator/projection/positional/#proj._S_&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36&lt;br/&gt;
*Referrer*: &lt;a href=&quot;https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/&quot;&gt;https://docs.mongodb.com/manual/tutorial/project-fields-from-query-results/&lt;/a&gt;&lt;br/&gt;
*Screen Resolution*: 1280 x 800&lt;br/&gt;
</environment>
        <key id="383225">DOCS-10250</key>
            <summary>Comment on: &quot;manual/reference/operator/projection/positional.txt&quot;</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13201">Fixed</resolution>
                                        <assignee username="irene.smith">Irene Smith</assignee>
                                    <reporter username="xgen-internal-docs">Docs Collector User</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Fri, 12 May 2017 22:50:12 +0000</created>
                <updated>Sun, 29 Oct 2023 13:59:48 +0000</updated>
                            <resolved>Thu, 2 Nov 2017 13:00:37 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="1714067" author="xgen-internal-githook" created="Tue, 31 Oct 2017 21:41:16 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;irenesmith@Irenes-MacBook-Pro.local&apos;, &apos;name&apos;: &apos;Irene Smith&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10250&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/projection/positional.txt&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10250&quot;&gt;&lt;del&gt;DOCS-10250&lt;/del&gt;&lt;/a&gt; Edited several places to make it clear that $ and only return the first matching document within an array.&lt;/p&gt;

&lt;p&gt;Signed-off-by: kay &amp;lt;kay.kim@10gen.com&amp;gt;&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/2594b7b6c1e8c627a8e57898c60be2d196703617&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/2594b7b6c1e8c627a8e57898c60be2d196703617&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1714066" author="xgen-internal-githook" created="Tue, 31 Oct 2017 21:41:01 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;irenesmith@Irenes-MacBook-Pro.local&apos;, &apos;name&apos;: &apos;Irene Smith&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10250&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/projection/positional.txt&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10250&quot;&gt;&lt;del&gt;DOCS-10250&lt;/del&gt;&lt;/a&gt; Edited several places to make it clear that $ and only return the first matching document within an array.&lt;/p&gt;

&lt;p&gt;Signed-off-by: kay &amp;lt;kay.kim@10gen.com&amp;gt;&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/c7019389ca8857c3ed45a1c72fe6a832ece05868&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/c7019389ca8857c3ed45a1c72fe6a832ece05868&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1714065" author="xgen-internal-githook" created="Tue, 31 Oct 2017 21:40:38 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;email&apos;: &apos;irenesmith@Irenes-MacBook-Pro.local&apos;, &apos;name&apos;: &apos;Irene Smith&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10250&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/projection/positional.txt&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10250&quot;&gt;&lt;del&gt;DOCS-10250&lt;/del&gt;&lt;/a&gt; Edited several places to make it clear that $ and only return the first matching document within an array.&lt;/p&gt;

&lt;p&gt;Signed-off-by: kay &amp;lt;kay.kim@10gen.com&amp;gt;&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/443e4320272dfe8917843b515da68381cbb61fd8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/443e4320272dfe8917843b515da68381cbb61fd8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1713643" author="irene.smith" created="Tue, 31 Oct 2017 16:28:14 +0000"  >&lt;p&gt;Pushed and pull request created:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/mongodb/docs/pull/3068&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/pull/3068&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="1688019" author="irene.smith" created="Tue, 3 Oct 2017 16:38:29 +0000"  >&lt;p&gt;Changed both instances mentioned in the task to clearly indicate that only the first match is returned from each document.&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>Fri, 12 May 2017 23:36:48 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        6 years, 15 weeks, 1 day 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>luke.bonanomi@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 15 weeks, 1 day ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>xgen-internal-docs</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</customfieldvalue>
            <customfieldvalue>irene.smith</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|ht7dgn:</customfieldvalue>

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

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