<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:11:10 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-6250] Operator $or doesn&apos;t work</title>
                <link>https://jira.mongodb.org/browse/SERVER-6250</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;&amp;gt; db.artists.find({img : {$exists : false}}).count()&lt;br/&gt;
5023&lt;br/&gt;
&amp;gt;  db.artists.find({$or : &lt;span class=&quot;error&quot;&gt;&amp;#91;{descr : {$exists : false}}, {img : {$exists : false}}&amp;#93;&lt;/span&gt;}).count()&lt;br/&gt;
0&lt;/p&gt;</description>
                <environment>fedora 16 KDE</environment>
        <key id="42848">SERVER-6250</key>
            <summary>Operator $or doesn&apos;t work</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="dcrosta">Daniel Crosta</assignee>
                                    <reporter username="tucibi">Roman Schurov</reporter>
                        <labels>
                    </labels>
                <created>Fri, 29 Jun 2012 14:30:08 +0000</created>
                <updated>Wed, 15 Aug 2012 14:24:19 +0000</updated>
                            <resolved>Mon, 2 Jul 2012 14:49:42 +0000</resolved>
                                    <version>2.0.6</version>
                                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="138643" author="tucibi" created="Mon, 2 Jul 2012 15:43:04 +0000"  >&lt;p&gt;Thanks, Dan.&lt;/p&gt;</comment>
                            <comment id="138616" author="dcrosta" created="Mon, 2 Jul 2012 14:49:42 +0000"  >&lt;p&gt;Ah, that explains it. $or was added in version 1.6, so if you need to use it, you will have to upgrade your server.&lt;/p&gt;</comment>
                            <comment id="138567" author="tucibi" created="Mon, 2 Jul 2012 13:37:50 +0000"  >&lt;p&gt;db.serverStatus()&lt;br/&gt;
{&lt;br/&gt;
        &quot;version&quot; : &quot;1.4.4&quot;,&lt;br/&gt;
...&lt;/p&gt;


&lt;p&gt;&amp;gt; db.artists.find()&lt;br/&gt;
&amp;gt; db.artists.insert({_id: 1, name: &quot;alice&quot;})&lt;br/&gt;
&amp;gt; db.artists.insert({_id: 2, name: &quot;bob&quot;, img: &quot;bob.jpg&quot;})&lt;br/&gt;
&amp;gt; db.artists.insert({_id: 3, name: &quot;carol&quot;, descr: &quot;Carol&quot;})&lt;br/&gt;
&amp;gt; db.artists.insert({_id: 4, name: &quot;dave&quot;, img: &quot;dave.jpg&quot;, descr: &quot;Dave&quot;})&lt;br/&gt;
&amp;gt; db.artists.find({img: {$exists: false}}).count()&lt;br/&gt;
2&lt;br/&gt;
&amp;gt; db.artists.find({$or: &lt;span class=&quot;error&quot;&gt;&amp;#91;{descr: {$exists: false}}, {img: {$exists: false}}&amp;#93;&lt;/span&gt;}).count()&lt;br/&gt;
0&lt;/p&gt;</comment>
                            <comment id="138560" author="dcrosta" created="Mon, 2 Jul 2012 13:21:41 +0000"  >&lt;p&gt;Thanks. I&apos;m not certain why the buildInfo command didn&apos;t work &amp;#8211; can you check the version of the server you&apos;re using? You can find this out with the &lt;tt&gt;db.serverStatus()&lt;/tt&gt; shell helper.&lt;/p&gt;

&lt;p&gt;I am still unable to reproduce this &amp;#8211; have you been able to create a small reproducable test case? Here&apos;s what I&apos;ve tried:&lt;/p&gt;

&lt;p/&gt;
&lt;div id=&quot;syntaxplugin&quot; class=&quot;syntaxplugin&quot; style=&quot;border: 1px dashed #bbb; border-radius: 5px !important; overflow: auto; max-height: 30em;&quot;&gt;
&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; width=&quot;100%&quot; style=&quot;font-size: 1em; line-height: 1.4em !important; font-weight: normal; font-style: normal; color: black;&quot;&gt;
		&lt;tbody &gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;  margin-top: 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.artists.insert({_id: 1, name: &quot;alice&quot;})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.artists.insert({_id: 2, name: &quot;bob&quot;, img: &quot;bob.jpg&quot;})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.artists.insert({_id: 3, name: &quot;carol&quot;, descr: &quot;Carol&quot;})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.artists.insert({_id: 4, name: &quot;dave&quot;, img: &quot;dave.jpg&quot;, descr: &quot;Dave&quot;})&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.artists.find({img: {$exists: false}}).count()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;2&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;&amp;gt; db.artists.find({$or: [{descr: {$exists: false}}, {img: {$exists: false}}]}).count()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
				&lt;tr id=&quot;syntaxplugin_code_and_gutter&quot;&gt;
						&lt;td  style=&quot; line-height: 1.4em !important; padding: 0em; vertical-align: top;&quot;&gt;
					&lt;pre style=&quot;font-size: 1em; margin: 0 10px;   margin-bottom: 10px;  width: auto; padding: 0;&quot;&gt;&lt;span style=&quot;color: black; font-family: &apos;Consolas&apos;, &apos;Bitstream Vera Sans Mono&apos;, &apos;Courier New&apos;, Courier, monospace !important;&quot;&gt;3&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;

&lt;p&gt;If you&apos;d like to share your actual data confidentially, let me know and I can provide information on how to do so.&lt;/p&gt;</comment>
                            <comment id="138478" author="tucibi" created="Mon, 2 Jul 2012 06:01:42 +0000"  >&lt;p&gt;Hi Dan.&lt;/p&gt;

&lt;p&gt;&amp;gt; db.artists.getIndexes()&lt;br/&gt;
[&lt;br/&gt;
        {&lt;br/&gt;
                &quot;name&quot; : &quot;&lt;em&gt;id&lt;/em&gt;&quot;,&lt;br/&gt;
                &quot;ns&quot; : &quot;ivi.artists&quot;,&lt;br/&gt;
                &quot;key&quot; : &lt;/p&gt;
{
                        &quot;_id&quot; : 1
                }
&lt;p&gt;        },&lt;br/&gt;
        {&lt;br/&gt;
                &quot;v&quot; : 1,&lt;br/&gt;
                &quot;key&quot; : &lt;/p&gt;
{
                        &quot;s&quot; : 1
                }
&lt;p&gt;,&lt;br/&gt;
                &quot;ns&quot; : &quot;ivi.artists&quot;,&lt;br/&gt;
                &quot;name&quot; : &quot;s_1&quot;&lt;br/&gt;
        }&lt;br/&gt;
]&lt;/p&gt;

&lt;p&gt;&amp;gt; db.artists.stats()&lt;br/&gt;
{&lt;br/&gt;
        &quot;ns&quot; : &quot;ivi.artists&quot;,&lt;br/&gt;
        &quot;count&quot; : 7676,&lt;br/&gt;
        &quot;size&quot; : 25232628,&lt;br/&gt;
        &quot;storageSize&quot; : 47582464,&lt;br/&gt;
        &quot;numExtents&quot; : 9,&lt;br/&gt;
        &quot;nindexes&quot; : 2,&lt;br/&gt;
        &quot;lastExtentSize&quot; : 13594624,&lt;br/&gt;
        &quot;paddingFactor&quot; : 1.4999999999998643,&lt;br/&gt;
        &quot;flags&quot; : 1,&lt;br/&gt;
        &quot;totalIndexSize&quot; : 794624,&lt;br/&gt;
        &quot;indexSizes&quot; : &lt;/p&gt;
{
                &quot;_id_&quot; : 327680,
                &quot;s_1&quot; : 466944
        }
&lt;p&gt;,&lt;br/&gt;
        &quot;ok&quot; : 1&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;&amp;gt; db.runCommand(&lt;/p&gt;
{buildInfo: 1}
&lt;p&gt;)&lt;br/&gt;
{ &quot;errmsg&quot; : &quot;no such cmd&quot;, &quot;bad cmd&quot; : &lt;/p&gt;
{ &quot;buildInfo&quot; : 1 }
&lt;p&gt;, &quot;ok&quot; : 0 }&lt;/p&gt;</comment>
                            <comment id="138072" author="dcrosta" created="Fri, 29 Jun 2012 19:30:00 +0000"  >&lt;p&gt;Hi Roman,&lt;/p&gt;

&lt;p&gt;I can&apos;t reproduce this case, at least not yet. Can you show the output of db.artists.getIndexes(), db.artists.stats(), and db.runCommand(&lt;/p&gt;
{buildInfo: 1}
&lt;p&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>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 29 Jun 2012 19:30:00 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        11 years, 33 weeks, 2 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>ian@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            11 years, 33 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="10020"><![CDATA[Linux]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>dcrosta</customfieldvalue>
            <customfieldvalue>tucibi</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrny4v:</customfieldvalue>

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

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

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