<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:00:21 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-2549] expression native support ,  find({ a: { $lt : b*2 } })</title>
                <link>https://jira.mongodb.org/browse/SERVER-2549</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description></description>
                <environment></environment>
        <key id="14725">SERVER-2549</key>
            <summary>expression native support ,  find({ a: { $lt : b*2 } })</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</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="3">Duplicate</resolution>
                                        <assignee username="backlog-server-query">Backlog - Query Team</assignee>
                                    <reporter username="jasonwt">jason</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Feb 2011 09:10:24 +0000</created>
                <updated>Tue, 6 Dec 2022 05:45:20 +0000</updated>
                            <resolved>Mon, 14 Aug 2017 18:17:34 +0000</resolved>
                                    <version>1.6.5</version>
                                                    <component>Querying</component>
                                        <votes>7</votes>
                                    <watches>7</watches>
                                                                                                                <comments>
                            <comment id="23842" author="jasonwt" created="Mon, 14 Feb 2011 09:15:09 +0000"  >&lt;p&gt;&amp;gt; db.cc.find(&lt;/p&gt;
{custid:1102598027,$where:&quot;this.a&amp;lt;this.b*2&quot;}
&lt;p&gt;).explain()&lt;br/&gt;
{&lt;br/&gt;
        &quot;cursor&quot; : &quot;BtreeCursor custid_1&quot;,&lt;br/&gt;
        &quot;nscanned&quot; : 189958,&lt;br/&gt;
        &quot;nscannedObjects&quot; : 189958,&lt;br/&gt;
        &quot;n&quot; : 0,&lt;br/&gt;
        &quot;millis&quot; : 3841,&lt;br/&gt;
        &quot;indexBounds&quot; : &lt;/p&gt;
{
                &quot;custid&quot; : [
                        [
                                1102598027,
                                1102598027
                        ]
                ]
        }
&lt;p&gt;}&lt;/p&gt;</comment>
                            <comment id="23841" author="jasonwt" created="Mon, 14 Feb 2011 09:13:08 +0000"  >&lt;p&gt;&lt;a href=&quot;http://passing.tk/index.php?q=YUhSMGNEb3ZMMmR5YjNWd2N5NW5iMjluYkdVdVkyOXRMMmR5YjNWd0wyMXZibWR2WkdJdGRYTmxjaTlpY205M2MyVmZkR2h5WldGa0wzUm9jbVZoWkM4eE5qVTNOek5qTWpJMVpqVmtOV1Zo&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://passing.tk/index.php?q=YUhSMGNEb3ZMMmR5YjNWd2N5NW5iMjluYkdVdVkyOXRMMmR5YjNWd0wyMXZibWR2WkdJdGRYTmxjaTlpY205M2MyVmZkR2h5WldGa0wzUm9jbVZoWkM4eE5qVTNOek5qTWpJMVpqVmtOV1Zo&lt;/a&gt;&lt;/p&gt;


&lt;p&gt;Difference between the two different ways of writing 100 times. &lt;br/&gt;
scan=189958  1.millis==394s  2.millis==3185 &lt;br/&gt;
1. &lt;br/&gt;
&amp;gt; db.cc.find(&lt;/p&gt;
{custid:1102598027,price:0}
&lt;p&gt;).explain() &lt;/p&gt;

&lt;p&gt;{ &lt;br/&gt;
        &quot;cursor&quot; : &quot;BtreeCursor custid_1&quot;, &lt;br/&gt;
        &quot;nscanned&quot; : 189958, &lt;br/&gt;
        &quot;nscannedObjects&quot; : 189958, &lt;br/&gt;
        &quot;n&quot; : 189958, &lt;br/&gt;
        &quot;millis&quot; : 394, &lt;br/&gt;
        &quot;indexBounds&quot; : &lt;/p&gt;
{ 
                &quot;custid&quot; : [ 
                        [ 
                                1102598027, 
                                1102598027 
                        ] 
                ] 
        }
&lt;p&gt; &lt;br/&gt;
} &lt;/p&gt;

&lt;p&gt;2. &lt;br/&gt;
&amp;gt; db.cc.find(&lt;/p&gt;
{custid:1102598027,$where:&quot;this.price==0&quot;}
&lt;p&gt;).explain() &lt;/p&gt;

&lt;p&gt;{ &lt;br/&gt;
        &quot;cursor&quot; : &quot;BtreeCursor custid_1&quot;, &lt;br/&gt;
        &quot;nscanned&quot; : 189958, &lt;br/&gt;
        &quot;nscannedObjects&quot; : 189958, &lt;br/&gt;
        &quot;n&quot; : 189958, &lt;br/&gt;
        &quot;millis&quot; : 3185, &lt;br/&gt;
        &quot;indexBounds&quot; : &lt;/p&gt;
{ 
                &quot;custid&quot; : [ 
                        [ 
                                1102598027, 
                                1102598027 
                        ] 
                ] 
        }
&lt;p&gt; &lt;/p&gt;


&lt;p&gt;Recommended to native support  find({ a: &lt;/p&gt;
{ $lt : b*2 }
&lt;p&gt; }) ,   &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; &lt;br/&gt;
select * from where a&amp;lt;b*2 &lt;br/&gt;
now find({$where: this.a&amp;lt;(this.b*2) }) so slow..... &lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="15034">SERVER-2702</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="23677">SERVER-4079</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15034">SERVER-2702</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>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_12751" key="com.atlassian.jira.plugin.system.customfieldtypes:multiselect">
                        <customfieldname>Assigned Teams</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="25143"><![CDATA[Query]]></customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Wed, 6 Jul 2016 19:53:36 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 1 week, 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>alexander.golin@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            13 years, 1 week, 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>backlog-server-query</customfieldvalue>
            <customfieldvalue>jasonwt</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrp66n:</customfieldvalue>

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

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

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