<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:37 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-279] Multi-key indexes with empty arrays may cause incorrect results on queries that don&apos;t use the full index</title>
                <link>https://jira.mongodb.org/browse/SERVER-279</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If you create a multi-key index that has documents omitted because they have null values or empty arrays, mongo may return incorrect results on other queries that attempt to use part of that index.  The query planner will use a multi-key index (take, for example, an index with keys: k0, k1) if you run a query that matches part of the index (for example, searching on k0).  However, if some documents are missing because criteria unrelated to the current query causes them to be excluded from the index (for example, where k1 is an array, and the document has an empty array), then searching just on the partial index will not return all documents that should have matched.&lt;/p&gt;

&lt;p&gt;Repro follows:&lt;/p&gt;

&lt;p&gt;MongoDB shell version: 1.1.0-&lt;br/&gt;
url: testdb&lt;br/&gt;
connecting to: 127.0.0.1:27001/testdb&lt;br/&gt;
type &quot;help&quot; for help&lt;br/&gt;
&amp;gt; db.party.save(&lt;/p&gt;
{id:1,info:[],str:&quot;hi&quot;}
&lt;p&gt;);&lt;br/&gt;
&amp;gt; db.party.save(&lt;/p&gt;
{id:1,info:[&quot;foo&quot;],str:&quot;hi&quot;}
&lt;p&gt;);&lt;br/&gt;
&amp;gt; db.party.find(&lt;/p&gt;
{id:1,str:&quot;hi&quot;}
&lt;p&gt;);&lt;/p&gt;
{&quot;_id&quot; :  ObjectId( &quot;4aa09b10fce2291061418fb1&quot;)  , &quot;id&quot; : 1 , &quot;info&quot; : [] , &quot;str&quot; : &quot;hi&quot;}
{&quot;_id&quot; :  ObjectId( &quot;4aa09b1bfce2291061418fb2&quot;)  , &quot;id&quot; : 1 , &quot;info&quot; : [&quot;foo&quot;] , &quot;str&quot; : &quot;hi&quot;}
&lt;p&gt;&amp;gt; db.party.ensureIndex(&lt;/p&gt;
{id:1,info:1}
&lt;p&gt;);&lt;br/&gt;
true&lt;br/&gt;
&amp;gt; db.party.find(&lt;/p&gt;
{id:1,str:&quot;hi&quot;}
&lt;p&gt;);     &lt;/p&gt;
{&quot;_id&quot; :  ObjectId( &quot;4aa09b1bfce2291061418fb2&quot;)  , &quot;id&quot; : 1 , &quot;info&quot; : [&quot;foo&quot;] , &quot;str&quot; : &quot;hi&quot;}
&lt;p&gt;&amp;gt; db.party.dropIndexes();             &lt;/p&gt;
{&quot;nIndexesWas&quot; : 2 , &quot;msg&quot; : &quot;all indexes deleted for collection&quot; , &quot;ok&quot; : 1}
&lt;p&gt;&amp;gt; db.party.ensureIndex(&lt;/p&gt;
{id:1}
&lt;p&gt;);       &lt;br/&gt;
true&lt;br/&gt;
&amp;gt; db.party.find(&lt;/p&gt;
{id:1,str:&quot;hi&quot;}
&lt;p&gt;);&lt;/p&gt;
{&quot;_id&quot; :  ObjectId( &quot;4aa09b10fce2291061418fb1&quot;)  , &quot;id&quot; : 1 , &quot;info&quot; : [] , &quot;str&quot; : &quot;hi&quot;}
{&quot;_id&quot; :  ObjectId( &quot;4aa09b1bfce2291061418fb2&quot;)  , &quot;id&quot; : 1 , &quot;info&quot; : [&quot;foo&quot;] , &quot;str&quot; : &quot;hi&quot;}</description>
                <environment>Any, git hash 644df81d2167628a7a9494a1953f981d148ebfbb</environment>
        <key id="10551">SERVER-279</key>
            <summary>Multi-key indexes with empty arrays may cause incorrect results on queries that don&apos;t use the full index</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="eliot">Eliot Horowitz</assignee>
                                    <reporter username="fes">Frank Swiderski</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Sep 2009 00:58:04 +0000</created>
                <updated>Tue, 12 Jul 2016 00:27:09 +0000</updated>
                            <resolved>Thu, 8 Oct 2009 13:09:05 +0000</resolved>
                                    <version>1.0.0</version>
                                    <fixVersion>1.1.2</fixVersion>
                                    <component>Index Maintenance</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="10909" author="eliot" created="Fri, 16 Oct 2009 15:33:20 +0000"  >&lt;p&gt;release 10/16/2009&lt;/p&gt;</comment>
                            <comment id="10859" author="eliot" created="Wed, 7 Oct 2009 16:45:21 +0000"  >&lt;p&gt;added a specific test jstests/multi2.js&lt;/p&gt;</comment>
                            <comment id="10648" author="eliot" created="Sun, 6 Sep 2009 14:36:39 +0000"  >&lt;p&gt;&lt;br/&gt;
I think this will go away once &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-146&quot; title=&quot;arrays don&amp;#39;t match themselves&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-146&quot;&gt;&lt;del&gt;SERVER-146&lt;/del&gt;&lt;/a&gt; is fixed, but not totally sure.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="10284">SERVER-146</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </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>Sun, 6 Sep 2009 14:36:39 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 18 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[<s><a href='https://jira.mongodb.org/browse/SERVER-146'>SERVER-146</a></s>]]></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>
                            14 years, 18 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>eliot</customfieldvalue>
            <customfieldvalue>fes</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpw5z:</customfieldvalue>

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

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

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