<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:59:33 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-2302] if a field has a regular filter and $ors, index breaks in</title>
                <link>https://jira.mongodb.org/browse/SERVER-2302</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;db.testcase.drop();&lt;br/&gt;
db.testcase.insert( { a : [ &lt;/p&gt;
{ x : 1 }
&lt;p&gt; , &lt;/p&gt;
{ x : 2 }
&lt;p&gt; , &lt;/p&gt;
{ x : 3 }
&lt;p&gt; , &lt;/p&gt;
{ x : 4 }
&lt;p&gt; ] } )&lt;/p&gt;


&lt;p&gt;function test(){&lt;br/&gt;
    print( db.testcase.find(&lt;br/&gt;
        { &lt;br/&gt;
            a : &lt;/p&gt;
{ x : 1 }
&lt;p&gt; , &lt;br/&gt;
            &quot;$or&quot; : [ { a : &lt;/p&gt;
{ x : 2 }
&lt;p&gt; } , { a : &lt;/p&gt;
{ x : 3 }
&lt;p&gt; } ]&lt;br/&gt;
        }&lt;br/&gt;
    ).count() )&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;// The first find will return a result since there isn&apos;t an index&lt;br/&gt;
test();&lt;/p&gt;

&lt;p&gt;// Now create an index&lt;/p&gt;

&lt;p&gt;db.testcase.ensureIndex(&lt;/p&gt;
{&quot;a&quot;:1}
&lt;p&gt;)&lt;/p&gt;

&lt;p&gt;// The same query will not return data now&lt;br/&gt;
test();&lt;/p&gt;

&lt;p&gt;// Drop the indexes&lt;/p&gt;

&lt;p&gt;db.testcase.dropIndexes()&lt;/p&gt;

&lt;p&gt;// And it will return data again&lt;br/&gt;
test()&lt;/p&gt;</description>
                <environment></environment>
        <key id="14106">SERVER-2302</key>
            <summary>if a field has a regular filter and $ors, index breaks in</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="eliot">Eliot Horowitz</reporter>
                        <labels>
                    </labels>
                <created>Wed, 29 Dec 2010 04:07:46 +0000</created>
                <updated>Tue, 12 Jul 2016 00:20:17 +0000</updated>
                            <resolved>Mon, 16 May 2011 19:45:11 +0000</resolved>
                                                    <fixVersion>1.9.1</fixVersion>
                                    <component>Index Maintenance</component>
                                        <votes>2</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="32966" author="aaron" created="Mon, 16 May 2011 19:45:11 +0000"  >&lt;p&gt;Addressed in the &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-958&quot; title=&quot;Range queries on arrays behave differently with indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-958&quot;&gt;&lt;del&gt;SERVER-958&lt;/del&gt;&lt;/a&gt; fix.&lt;/p&gt;</comment>
                            <comment id="29622" author="aaron" created="Mon, 25 Apr 2011 21:30:14 +0000"  >&lt;p&gt;Actually for this jira:&lt;/p&gt;

&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-2303&quot; title=&quot;Look into using pthread_atfork to call OID::justForked() automatically&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-2303&quot;&gt;&lt;del&gt;SERVER-2303&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/06b905b0fd11021444ba964d70ee012b81684bd2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/06b905b0fd11021444ba964d70ee012b81684bd2&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="26147" author="eliot" created="Thu, 17 Mar 2011 19:55:01 +0000"  >&lt;p&gt;Lets do the other case first and see if this falls out.&lt;br/&gt;
We can also just do $and soon as well since its often asked for and might make this work.&lt;/p&gt;</comment>
                            <comment id="23614" author="aaron" created="Thu, 10 Feb 2011 21:20:01 +0000"  >&lt;p&gt;Just to be clear, I&apos;m not advocating the above as a permanent fix, but a temporary measure so we don&apos;t have incorrect results near term.  What I proposed seems like the simplest of the quick fix options.&lt;/p&gt;</comment>
                            <comment id="23612" author="aaron" created="Thu, 10 Feb 2011 21:15:33 +0000"  >&lt;p&gt;It sounds like we want to do a bunch of refactoring before &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-958&quot; title=&quot;Range queries on arrays behave differently with indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-958&quot;&gt;&lt;del&gt;SERVER-958&lt;/del&gt;&lt;/a&gt;.  One quick way of dealing with this $or jira would be to uassert when a user attempts an $or query with an equality expression on the same field in both an $or clause and outside the $or clauses.  Doing a double equality match like this is basically a hacky way of doing an $and expression, and we don&apos;t support $and yet.&lt;/p&gt;</comment>
                            <comment id="21901" author="aaron" created="Wed, 29 Dec 2010 05:31:45 +0000"  >&lt;p&gt;If the fix is urgent I could probably do something more quickly though.&lt;/p&gt;</comment>
                            <comment id="21900" author="eliot" created="Wed, 29 Dec 2010 05:30:52 +0000"  >&lt;p&gt;I mean in 1.9.0, backported to 1.8.1 likely.&lt;/p&gt;</comment>
                            <comment id="21899" author="aaron" created="Wed, 29 Dec 2010 05:28:30 +0000"  >&lt;p&gt;This kind of sucks, but it&apos;s not trivial to fix.  A fixed implementation would have a lot in common with the &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-958&quot; title=&quot;Range queries on arrays behave differently with indexes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-958&quot;&gt;&lt;del&gt;SERVER-958&lt;/del&gt;&lt;/a&gt; fix, so I&apos;d recommend working on them at the same time.&lt;/p&gt;

&lt;p&gt;Did you mean 1.8.1 in your comment or 1.9.1?&lt;/p&gt;</comment>
                            <comment id="21895" author="eliot" created="Wed, 29 Dec 2010 04:08:04 +0000"  >&lt;p&gt;Take a look for 1.7.5&lt;br/&gt;
If its easy fix, otherwise 1.8.1&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                            <outwardlinks description="depends on">
                                        <issuelink>
            <issuekey id="11692">SERVER-958</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 29 Dec 2010 05:28:30 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 40 weeks, 2 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-958'>SERVER-958</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>
                            12 years, 40 weeks, 2 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>eliot</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp98f:</customfieldvalue>

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

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

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