<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:01:06 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-10660] Comment on: &quot;manual/reference/operator/aggregation/size&quot;</title>
                <link>https://jira.mongodb.org/browse/DOCS-10660</link>
                <project id="10380" key="DOCS">Documentation</project>
                    <description>&lt;p&gt;The example skips a very important caveat:  All documents must have the list, otherwise there should be a match step before the size.  &lt;/p&gt;

&lt;p&gt;example &lt;br/&gt;
test collection:&lt;/p&gt;
{ &quot;_id&quot; : 1,    &quot;myArray&quot; : [ 1, 2 ], &quot;myStr&quot; : &quot;sfsaf&quot;}
{ &quot;_id&quot; : 2,    &quot;myStr&quot; : &quot;asdf&quot;}

&lt;p&gt;aggregation pipeline: &lt;br/&gt;
db.getCollection(&apos;test&apos;).aggregate(&lt;span class=&quot;error&quot;&gt;&amp;#91;{$project:{_id:1, &amp;quot;arraySize&amp;quot;:{$size:&amp;quot;$myArray&amp;quot;}}}&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;error: uncaught exception: aggregate failed: &lt;/p&gt;
{
	&quot;ok&quot; : 0,
	&quot;errmsg&quot; : &quot;The argument to $size must be an array, but was of type: missing&quot;,
	&quot;code&quot; : 17124,
	&quot;codeName&quot; : &quot;Location17124&quot;
}

&lt;p&gt;pipeline with match added: &lt;br/&gt;
db.getCollection(&apos;test&apos;).aggregate(&lt;span class=&quot;error&quot;&gt;&amp;#91;{$match:{myArray:{$exists:true}}},{$project:{_id:1, &amp;quot;arraySize&amp;quot;:{$size:&amp;quot;$myArray&amp;quot;}}}&amp;#93;&lt;/span&gt;)&lt;/p&gt;

&lt;p&gt;result:&lt;br/&gt;
{&lt;br/&gt;
    &quot;result&quot; : [ &lt;/p&gt;
        {
            &quot;_id&quot; : ObjectId(&quot;598b464d4fa2cd261a1cc433&quot;),
            &quot;arraySize&quot; : 2
        }
&lt;p&gt;    ],&lt;br/&gt;
    &quot;ok&quot; : 1.0000000000000000&lt;br/&gt;
}&lt;/p&gt;
</description>
                <environment>Windows 7, mongo version 3.4.2&lt;br/&gt;
&lt;br/&gt;
*Location*: &lt;a href=&quot;https://docs.mongodb.com/manual/reference/operator/aggregation/size/&quot;&gt;https://docs.mongodb.com/manual/reference/operator/aggregation/size/&lt;/a&gt;&lt;br/&gt;
*User-Agent*: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0&lt;br/&gt;
*Screen Resolution*: 1536 x 864</environment>
        <key id="414586">DOCS-10660</key>
            <summary>Comment on: &quot;manual/reference/operator/aggregation/size&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="kay.kim@mongodb.com">Kay Kim</assignee>
                                    <reporter username="aaldredge@enspirecommerce.com">Amy Aldredge</reporter>
                        <labels>
                            <label>collector-298ba4e7</label>
                    </labels>
                <created>Wed, 9 Aug 2017 17:36:02 +0000</created>
                <updated>Mon, 30 Oct 2023 21:07:51 +0000</updated>
                            <resolved>Thu, 13 Dec 2018 18:14:06 +0000</resolved>
                                                    <fixVersion>Server_Docs_20231030</fixVersion>
                                    <component>manual</component>
                    <component>Server</component>
                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="2089916" author="xgen-internal-githook" created="Thu, 13 Dec 2018 18:00:49 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kay-kim&apos;, &apos;email&apos;: &apos;kay.kim@10gen.com&apos;, &apos;name&apos;: &apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10660&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/aggregation/size&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10660&quot;&gt;&lt;del&gt;DOCS-10660&lt;/del&gt;&lt;/a&gt;: update $size example to check if array&lt;br/&gt;
Branch: v3.2&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/0930773627789c7cebe3dd2c73fe58afc547ff6c&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/0930773627789c7cebe3dd2c73fe58afc547ff6c&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2089912" author="xgen-internal-githook" created="Thu, 13 Dec 2018 17:59:58 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kay-kim&apos;, &apos;email&apos;: &apos;kay.kim@10gen.com&apos;, &apos;name&apos;: &apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10660&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/aggregation/size&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10660&quot;&gt;&lt;del&gt;DOCS-10660&lt;/del&gt;&lt;/a&gt;: update $size example to check if array&lt;br/&gt;
Branch: v3.4&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/109b188dc1ebc92aadb42a44bb18cbfef977c8f4&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/109b188dc1ebc92aadb42a44bb18cbfef977c8f4&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2089897" author="xgen-internal-githook" created="Thu, 13 Dec 2018 17:52:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kay-kim&apos;, &apos;email&apos;: &apos;kay.kim@10gen.com&apos;, &apos;name&apos;: &apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10660&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/aggregation/size&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10660&quot;&gt;&lt;del&gt;DOCS-10660&lt;/del&gt;&lt;/a&gt;: update $size example to check if array&lt;br/&gt;
Branch: v3.6&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/b53d397c16addd1b8794cbd676c90f75b4d0af35&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/b53d397c16addd1b8794cbd676c90f75b4d0af35&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2089894" author="xgen-internal-githook" created="Thu, 13 Dec 2018 17:52:04 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kay-kim&apos;, &apos;email&apos;: &apos;kay.kim@10gen.com&apos;, &apos;name&apos;: &apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10660&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/aggregation/size&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10660&quot;&gt;&lt;del&gt;DOCS-10660&lt;/del&gt;&lt;/a&gt;: update $size example to check if array&lt;br/&gt;
Branch: v4.0&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/785584909216b60876635c2a09dec2be979e4dcf&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/785584909216b60876635c2a09dec2be979e4dcf&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="2089892" author="xgen-internal-githook" created="Thu, 13 Dec 2018 17:51:41 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{&apos;username&apos;: &apos;kay-kim&apos;, &apos;email&apos;: &apos;kay.kim@10gen.com&apos;, &apos;name&apos;: &apos;kay&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-10660&quot; title=&quot;Comment on: &amp;quot;manual/reference/operator/aggregation/size&amp;quot;&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-10660&quot;&gt;&lt;del&gt;DOCS-10660&lt;/del&gt;&lt;/a&gt;: update $size example to check if array&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/docs/commit/fa3c2a7edc4488afd4dac75743ecf6e20a8e6e57&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/docs/commit/fa3c2a7edc4488afd4dac75743ecf6e20a8e6e57&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>Wed, 9 Aug 2017 17:54:01 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        5 years, 8 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_10857" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>DOCSP-1769</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>
                            5 years, 8 weeks, 6 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>aaldredge@enspirecommerce.com</customfieldvalue>
            <customfieldvalue>xgen-internal-githook</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|htco5j:</customfieldvalue>

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

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