<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:31 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-1943] adding an index returns different results when their is an empty array</title>
                <link>https://jira.mongodb.org/browse/SERVER-1943</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;Problem:&lt;br/&gt;
A different number of documents are returned if an array is indexed or not.&lt;/p&gt;

&lt;p&gt;Reproduce:&lt;/p&gt;

&lt;p&gt;&amp;gt; db.perm.save( &lt;/p&gt;
{ what : &quot;1&quot;, permissions  : [ &quot;perm-access-help&quot; ] }
&lt;p&gt;)            &lt;br/&gt;
&amp;gt; db.perm.save( &lt;/p&gt;
{ what : &quot;2&quot;, permissions : [ &quot;perm-access-admin-area&quot; ] }
&lt;p&gt;)      &lt;br/&gt;
&amp;gt; db.perm.save( &lt;/p&gt;
{ what : &quot;3&quot;, permissions : [ &quot;perm-access-admin-area&quot;,&quot;perm-access-help&quot; ] }
&lt;p&gt;)&lt;br/&gt;
&amp;gt; db.perm.save( &lt;/p&gt;
{ what : &quot;4&quot;, permissions : [ ] }
&lt;p&gt;)        &lt;br/&gt;
&amp;gt; db.perm.save( &lt;/p&gt;
{ what : &quot;5&quot; }
&lt;p&gt;) &lt;/p&gt;

&lt;p&gt;Query with out the index, returns four documents&lt;br/&gt;
&amp;gt; db.perm.find( { permissions : &lt;/p&gt;
{ $in:[&quot;perm-access-help&quot;, &quot;perm-access-admin-area&quot;, null] }
&lt;p&gt; } )                                      &lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4cb64a7540292d4539c3ceeb&quot;), &quot;what&quot; : &quot;1&quot;, &quot;permissions&quot; : [ &quot;perm-access-help&quot; ] }
{ &quot;_id&quot; : ObjectId(&quot;4cb64a8040292d4539c3ceec&quot;), &quot;what&quot; : &quot;2&quot;, &quot;permissions&quot; : [ &quot;perm-access-admin-area&quot; ] }
{ &quot;_id&quot; : ObjectId(&quot;4cb64a8b40292d4539c3ceed&quot;), &quot;what&quot; : &quot;3&quot;, &quot;permissions&quot; : [ &quot;perm-access-admin-area&quot;, &quot;perm-access-help&quot; ] }
{ &quot;_id&quot; : ObjectId(&quot;4cb64aa140292d4539c3ceef&quot;), &quot;what&quot; : &quot;5&quot; }

&lt;p&gt;Adding the index returns 5 documents&lt;br/&gt;
&amp;gt; db.perm.ensureIndex( &lt;/p&gt;
{permissions : 1}
&lt;p&gt; )&lt;br/&gt;
&amp;gt; db.perm.find( { permissions : &lt;/p&gt;
{ $in:[&quot;perm-access-help&quot;, &quot;perm-access-admin-area&quot;, null] }
&lt;p&gt; } )&lt;/p&gt;
{ &quot;_id&quot; : ObjectId(&quot;4cb64a9940292d4539c3ceee&quot;), &quot;what&quot; : &quot;4&quot;, &quot;permissions&quot; : [ ] }
{ &quot;_id&quot; : ObjectId(&quot;4cb64aa140292d4539c3ceef&quot;), &quot;what&quot; : &quot;5&quot; }
{ &quot;_id&quot; : ObjectId(&quot;4cb64a8040292d4539c3ceec&quot;), &quot;what&quot; : &quot;2&quot;, &quot;permissions&quot; : [ &quot;perm-access-admin-area&quot; ] }
{ &quot;_id&quot; : ObjectId(&quot;4cb64a8b40292d4539c3ceed&quot;), &quot;what&quot; : &quot;3&quot;, &quot;permissions&quot; : [ &quot;perm-access-admin-area&quot;, &quot;perm-access-help&quot; ] }
{ &quot;_id&quot; : ObjectId(&quot;4cb64a7540292d4539c3ceeb&quot;), &quot;what&quot; : &quot;1&quot;, &quot;permissions&quot; : [ &quot;perm-access-help&quot; ] }

&lt;p&gt;Business Case:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;reliability&lt;br/&gt;
The behavior of the query should not change depending on whether an index is present or not.&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="13371">SERVER-1943</key>
            <summary>adding an index returns different results when their is an empty array</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="9">Done</resolution>
                                        <assignee username="aaron">Aaron Staple</assignee>
                                    <reporter username="alvin">Alvin Richards</reporter>
                        <labels>
                    </labels>
                <created>Thu, 14 Oct 2010 01:44:11 +0000</created>
                <updated>Tue, 12 Jul 2016 00:17:26 +0000</updated>
                            <resolved>Mon, 1 Aug 2011 17:14:51 +0000</resolved>
                                    <version>1.6.2</version>
                                    <fixVersion>1.9.2</fixVersion>
                                    <component>Index Maintenance</component>
                                        <votes>2</votes>
                                    <watches>4</watches>
                                                                                                                <comments>
                            <comment id="45477" author="auto" created="Sun, 31 Jul 2011 17:27:47 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1943&quot; title=&quot;adding an index returns different results when their is an empty array&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1943&quot;&gt;&lt;del&gt;SERVER-1943&lt;/del&gt;&lt;/a&gt; test key ordering for empty arrays&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/0141015c83c0fc70f5bb40c55ed62e21aab0cfb7&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/0141015c83c0fc70f5bb40c55ed62e21aab0cfb7&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="45474" author="auto" created="Sun, 31 Jul 2011 17:27:42 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1943&quot; title=&quot;adding an index returns different results when their is an empty array&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1943&quot;&gt;&lt;del&gt;SERVER-1943&lt;/del&gt;&lt;/a&gt; test&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/e44abd016d702c43519f2efc091c6a4ca0707994&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/e44abd016d702c43519f2efc091c6a4ca0707994&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="26846" author="auto" created="Fri, 25 Mar 2011 18:31:24 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;astaple&apos;, u&apos;name&apos;: u&apos;Aaron&apos;, u&apos;email&apos;: u&apos;aaron@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-2343&quot; title=&quot;$in check for empty array does not work&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2343&quot;&gt;&lt;del&gt;SERVER-2343&lt;/del&gt;&lt;/a&gt; &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1943&quot; title=&quot;adding an index returns different results when their is an empty array&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1943&quot;&gt;&lt;del&gt;SERVER-1943&lt;/del&gt;&lt;/a&gt; test&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/02162fa52bccc9314aed2a7f78caee78149d7d7f&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/02162fa52bccc9314aed2a7f78caee78149d7d7f&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                        <issuelink>
            <issuekey id="19140">SERVER-3375</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 25 Mar 2011 18:31:24 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 29 weeks, 3 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>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 29 weeks, 3 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </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>aaron</customfieldvalue>
            <customfieldvalue>alvin</customfieldvalue>
            <customfieldvalue>auto</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpd5r:</customfieldvalue>

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

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

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