<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:12:38 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-6767] Interpret $query as special so you can copy profiler/logged queries into shell</title>
                <link>https://jira.mongodb.org/browse/SERVER-6767</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;If the query starts with &lt;span class=&quot;error&quot;&gt;&amp;#91;$&amp;#93;&lt;/span&gt;query (like db.coll.find({$query:{...}})) then we should set the _special boolean to true. This will allow running this:&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;   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;db.coll.find({$query:...}).explain()&lt;/span&gt;&lt;/pre&gt;
			&lt;/td&gt;
		&lt;/tr&gt;
			&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p/&gt;</description>
                <environment></environment>
        <key id="47119">SERVER-6767</key>
            <summary>Interpret $query as special so you can copy profiler/logged queries into shell</summary>
                <type id="4" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14710&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</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="2">Won&apos;t Fix</resolution>
                                        <assignee username="david.storch@mongodb.com">David Storch</assignee>
                                    <reporter username="scotthernandez">Scott Hernandez</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Tue, 14 Aug 2012 21:09:33 +0000</created>
                <updated>Mon, 20 Jun 2016 16:17:48 +0000</updated>
                            <resolved>Mon, 19 Oct 2015 18:17:46 +0000</resolved>
                                                                    <component>Shell</component>
                    <component>Usability</component>
                                        <votes>0</votes>
                                    <watches>10</watches>
                                                                                                                <comments>
                            <comment id="1064551" author="david.storch" created="Mon, 19 Oct 2015 18:17:34 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=drsmith&quot; class=&quot;user-hover&quot; rel=&quot;drsmith&quot;&gt;drsmith&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;I believe the shell command you are looking for in order to explain a query with a min and with a limit is as follows:&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;   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;db.coll.find({...}).min({...}).limit(X).explain();&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;Granted, the docs about how to use explain are a bit scattered and hard to track down, so I&apos;ve filed an improvement request with our documentation team: &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-6403&quot; title=&quot;Create a &amp;quot;Query Diagnostics&amp;quot; page&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-6403&quot;&gt;DOCS-6403&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Note that starting in version 3.2, use of $-prefixed options inside the query predicate (&lt;tt&gt;$min&lt;/tt&gt;, &lt;tt&gt;$max&lt;/tt&gt;, &lt;tt&gt;$maxScan&lt;/tt&gt;, &lt;tt&gt;$returnKey&lt;/tt&gt;, etc.) will be deprecated. Instead, shell code should use the corresponding shell helpers (&lt;tt&gt;.min()&lt;/tt&gt;, &lt;tt&gt;.max()&lt;/tt&gt;, &lt;tt&gt;.maxScan()&lt;/tt&gt;, &lt;tt&gt;.returnKey()&lt;/tt&gt; etc.). This will be documented by &lt;a href=&quot;https://jira.mongodb.org/browse/DOCS-5986&quot; title=&quot;Remove documentation of shell&amp;#39;s wrapped query format, including $-prefixed query options and _addSpecial()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;DOCS-5986&quot;&gt;&lt;del&gt;DOCS-5986&lt;/del&gt;&lt;/a&gt;. The reasoning behind this is that for 3.2 we added new commands for issuing queries under SERVER-15176 which accept the query parameters in a different format. Use of the shell helpers like &lt;tt&gt;.min()&lt;/tt&gt; abstracts over the underlying network protocol and allows the shell to pass the parameters using the proper format.&lt;/p&gt;

&lt;p&gt;Since the &lt;tt&gt;$query&lt;/tt&gt; format is now illegal in the shell, I am closing this ticket as &quot;Won&apos;t Fix&quot;.&lt;/p&gt;

&lt;p&gt;Best,&lt;br/&gt;
Dave&lt;/p&gt;</comment>
                            <comment id="1064178" author="drsmith" created="Mon, 19 Oct 2015 14:23:41 +0000"  >&lt;p&gt;Almost 3 years! Would be great to get this fixed. &lt;/p&gt;

&lt;p&gt;I&apos;ve got a query I don&apos;t think I can use the workaround (suggested here &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-14564&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;https://jira.mongodb.org/browse/SERVER-14564&lt;/a&gt;) for.&lt;/p&gt;

&lt;p&gt;db.collection.find({$min:{...}}, {$query:{}}).limit(X).explain()&lt;/p&gt;

&lt;p&gt;is not the same as&lt;/p&gt;

&lt;p&gt;db.collection.find({$min:{...}}, {$query:{}}, $explain: true).limit(X).&lt;/p&gt;

&lt;p&gt;Is there a workaround to limit before the explain?&lt;/p&gt;

&lt;p&gt;Unless there is a way to&lt;/p&gt;</comment>
                            <comment id="225454" author="greg_10gen" created="Thu, 27 Dec 2012 18:06:57 +0000"  >&lt;p&gt;Reverted pending further discussion.&lt;/p&gt;</comment>
                            <comment id="225452" author="auto" created="Thu, 27 Dec 2012 18:06:19 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-27T18:01:34Z&apos;, u&apos;email&apos;: u&apos;greg@10gen.com&apos;, u&apos;name&apos;: u&apos;Greg Studer&apos;}
&lt;p&gt;Message: Revert &quot;&lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6767&quot; title=&quot;Interpret $query as special so you can copy profiler/logged queries into shell&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6767&quot;&gt;&lt;del&gt;SERVER-6767&lt;/del&gt;&lt;/a&gt;: do smarter things with find({$query:...}).explain()&quot;&lt;/p&gt;

&lt;p&gt;This reverts commit d06c2ff635acc548e73381d669d9f66f7e225ea8.&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/2b6c0b2de87857f007adee67bb06c81b414c41fc&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/2b6c0b2de87857f007adee67bb06c81b414c41fc&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="224882" author="auto" created="Wed, 26 Dec 2012 23:38:13 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;date&apos;: u&apos;2012-12-26T23:36:02Z&apos;, u&apos;email&apos;: u&apos;scotthernandez@gmail.com&apos;, u&apos;name&apos;: u&apos;Scott Hernandez&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-6767&quot; title=&quot;Interpret $query as special so you can copy profiler/logged queries into shell&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-6767&quot;&gt;&lt;del&gt;SERVER-6767&lt;/del&gt;&lt;/a&gt;: do smarter things with find({$query:...}).explain()&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/d06c2ff635acc548e73381d669d9f66f7e225ea8&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/d06c2ff635acc548e73381d669d9f66f7e225ea8&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="207182" author="scotthernandez" created="Wed, 5 Dec 2012 16:36:39 +0000"  >&lt;p&gt;Currently this creates a query which wraps the $query and will cause a collection scan.&lt;/p&gt;

&lt;p&gt;It basically becomes this query: &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;   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;{query:{ $query : ... }, $explain: true}&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;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="64216">SERVER-8447</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="81009">SERVER-10079</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="83619">SERVER-10352</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="139216">SERVER-14091</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="147258">SERVER-14564</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="180235">SERVER-17004</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="194739">SERVER-17928</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="290734">SERVER-24341</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="60270">SERVER-8025</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="77105">SERVER-9812</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="182441">SERVER-17171</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="47127">SERVER-6768</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="58496">DOCS-856</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>6.0</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, 26 Dec 2012 23:38:13 +0000</customfieldvalue>

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

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            8 years, 17 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_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>david.storch@mongodb.com</customfieldvalue>
            <customfieldvalue>drsmith</customfieldvalue>
            <customfieldvalue>greg_10gen</customfieldvalue>
            <customfieldvalue>scotthernandez</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrnrtj:</customfieldvalue>

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

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

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