<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:05:28 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-4261] mongoexport query doesn&apos;t support advanced queries</title>
                <link>https://jira.mongodb.org/browse/SERVER-4261</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;When I try and do a mongoexport using an an advanced query, I get 0 records even if there are matching objects.&lt;/p&gt;

&lt;p&gt;mongoexport --csv -h localhost -d contents -c Author -q &quot;{&apos;facebookName&apos;:{&apos;$ne&apos;:null}}&quot; -f profileUrl,facebookName&lt;/p&gt;

&lt;p&gt;I tried a few of the other dollar operators such as $in and $nin and they all appear to have the same result.&lt;/p&gt;</description>
                <environment></environment>
        <key id="24813">SERVER-4261</key>
            <summary>mongoexport query doesn&apos;t support advanced queries</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="5" iconUrl="https://jira.mongodb.org/images/icons/priorities/trivial.svg">Trivial - P5</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="-1">Unassigned</assignee>
                                    <reporter username="ddunlop@forbes.com">David Dunlop</reporter>
                        <labels>
                            <label>neweng</label>
                    </labels>
                <created>Fri, 11 Nov 2011 18:11:06 +0000</created>
                <updated>Sat, 6 Dec 2014 18:41:51 +0000</updated>
                            <resolved>Fri, 22 Jun 2012 15:09:07 +0000</resolved>
                                    <version>2.0.1</version>
                                                    <component>Tools</component>
                                        <votes>2</votes>
                                    <watches>6</watches>
                                                                                                                <comments>
                            <comment id="780142" author="y0ft88" created="Sat, 6 Dec 2014 18:41:51 +0000"  >&lt;p&gt;I&apos;m facing this error with :&lt;/p&gt;

&lt;p&gt;mongoexport --db fscrap --collection Wall -q &quot;{\$or : &lt;span class=&quot;error&quot;&gt;&amp;#91;{&amp;#39;insert_time&amp;#39; : {\$gte : new Date(1393624800000)} },{&amp;#39;comments.comment_time&amp;#39; : {\$gte : new Date(1393624800000)}}&amp;#93;&lt;/span&gt;}&quot; --out test.json&lt;/p&gt;

&lt;p&gt;even with escaping I&apos;m getting zero records while the query WORKS in mongo shell&lt;/p&gt;</comment>
                            <comment id="135728" author="dwight_10gen" created="Fri, 22 Jun 2012 15:08:27 +0000"  >&lt;p&gt;you need to escape the $ character in some shells. &lt;/p&gt;

&lt;p&gt;$ echo &quot;{&apos;facebookName&apos;:{&apos;$ne&apos;:null}}&quot;&lt;br/&gt;
{&apos;facebookName&apos;:{&apos;&apos;:null}}&lt;br/&gt;
$ echo &quot;{&apos;facebookName&apos;:{&apos;\$ne&apos;:null}}&quot;&lt;br/&gt;
{&apos;facebookName&apos;:{&apos;$ne&apos;:null}}&lt;/p&gt;</comment>
                            <comment id="124059" author="erickrdch" created="Tue, 29 May 2012 20:42:59 +0000"  >&lt;p&gt;I am having problems with a big query, same one worked perfectly on the Linux server.&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Command&lt;/b&gt;&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;mongoexport --host repset/server1,server2,server3 --db somedb --collection somecollection --query &apos;{&quot;_id&quot;:{&quot;$in&quot;:[ObjectId(&quot;4f9184671472321f78bab744&quot;),ObjectId(&quot;4f918a05be6eaf147876f56c&quot;),ObjectId(&quot;4f91afc269e6115b0cde666f&quot;),ObjectId(&quot;4f91b60682718239528a134d&quot;),ObjectId(&quot;4f95841b85d671614ddaf6a6&quot;),ObjectId(&quot;4f98ffbc41c7985843ed4900&quot;),ObjectId(&quot;4f9d9e8e1d8cde314e438646&quot;),ObjectId(&quot;4f9edc34df41aab00ffc52f6&quot;),ObjectId(&quot;4fa0c720e43f2b804d64c38b&quot;),ObjectId(&quot;4fa0c80a4880bd8f4d096d27&quot;),ObjectId(&quot;4fa0c93e4880bd8f4d09ffa2&quot;),ObjectId(&quot;4fa2f28ec7b480a466ec2672&quot;),ObjectId(&quot;4fa2f620fcd694a97a7915ca&quot;),ObjectId(&quot;4fa444e377d839673cb27302&quot;),ObjectId(&quot;4fa80fd06c1d33a419bde3f4&quot;),ObjectId(&quot;4fa91116ad3b5e1564f5fa93&quot;),ObjectId(&quot;4fa9640ab74b4997195f51e1&quot;),ObjectId(&quot;4faa9470dc2022ba69239c5c&quot;),ObjectId(&quot;4faab00c6c1d33a419b23a8e&quot;),ObjectId(&quot;4faab79aead3a2a319a9b1a6&quot;),ObjectId(&quot;4facb958f10e0bf84449887e&quot;),ObjectId(&quot;4facba56480938f9443b6bc8&quot;),ObjectId(&quot;4fad31ccd424305974a55f97&quot;),ObjectId(&quot;4fad3c01d424305974b4f97b&quot;),ObjectId(&quot;4fad425dd424305974c65e74&quot;),ObjectId(&quot;4fad86c1070a209819a259b3&quot;),ObjectId(&quot;4fae7a403420e8a10500d969&quot;),ObjectId(&quot;4faf3acb0390ae3d67000968&quot;),ObjectId(&quot;4fb13f7fd795811322088594&quot;),ObjectId(&quot;4fb1b641b0280d2d4b00c66b&quot;),ObjectId(&quot;4fb1c9a8474d4f2a4b019ede&quot;),ObjectId(&quot;4fb236f3ed79638b1501b740&quot;),ObjectId(&quot;4fb25573be65869377080e8c&quot;),ObjectId(&quot;4fb25f44ba71c9a441006abc&quot;),ObjectId(&quot;4fb415714288f4a61f1103e5&quot;),ObjectId(&quot;4fb4e846892ef42a16023952&quot;),ObjectId(&quot;4fb55010ae1160bd1403d03e&quot;),ObjectId(&quot;4fb553ca26af85d82400192e&quot;),ObjectId(&quot;4fb9078253f808b16a02d82a&quot;),ObjectId(&quot;4fbc044fb011b8353a156de0&quot;),ObjectId(&quot;4fbc06a66af6d3e579013ddc&quot;),ObjectId(&quot;4fbc7812e96ae1f84c11fb4a&quot;),ObjectId(&quot;4fbc8dd56af6d3e57901d7a3&quot;),ObjectId(&quot;4fbc8e396e5372346f010c8d&quot;),ObjectId(&quot;4fbc8fc96e5372346f01103e&quot;),ObjectId(&quot;4fbc9088acfe3d482502a75c&quot;),ObjectId(&quot;4fbc90b1a0a0acc24906eb55&quot;),ObjectId(&quot;4fbc9220ec2181161d03e9fc&quot;),ObjectId(&quot;4fbcbbaaa0a0acc24918455e&quot;),ObjectId(&quot;4fbce4428bcfdefb54032b24&quot;),ObjectId(&quot;4fbce470a0a0acc2491934bd&quot;),ObjectId(&quot;4fbe7bfed0c89fc428010ec0&quot;),ObjectId(&quot;4fbe8c6d95266c46790d220a&quot;),ObjectId(&quot;4fbf405bdeff1f4944011048&quot;),ObjectId(&quot;4fbfb0b84325335f5e034575&quot;),ObjectId(&quot;4fbfb402410bde5d5e04abc7&quot;),ObjectId(&quot;4fbfe9330406e2605e0c6338&quot;),ObjectId(&quot;4fbff1feb424611e5911b1e5&quot;),ObjectId(&quot;4fbff432666a595e5e08296a&quot;),ObjectId(&quot;4fbff5ba666a595e5e082990&quot;),ObjectId(&quot;4fc0458cdf8b454644044a5d&quot;),ObjectId(&quot;4fc046579fe5e24844063c1f&quot;),ObjectId(&quot;4fc04a9a92aa62474404a6d1&quot;),ObjectId(&quot;4fc06546b49af55a3c090ef0&quot;)]}}&apos; --out somefile.json&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;&lt;b&gt;Windows output&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Tue May 29 16:29:07 &lt;span class=&quot;error&quot;&gt;&amp;#91;ReplicaSetMonitorWatcher&amp;#93;&lt;/span&gt; starting&lt;br/&gt;
connected to: repset/server1,server2,server3&lt;br/&gt;
Tue May 29 16:29:07 Assertion: 10340:Failure parsing JSON string near: &apos;{_id:{$in&lt;br/&gt;
assertion: 10340 Failure parsing JSON string near: &apos;{_id:{$in&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Linux output&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Tue May 29 11:28:34 &lt;span class=&quot;error&quot;&gt;&amp;#91;ReplicaSetMonitorWatcher&amp;#93;&lt;/span&gt; starting&lt;br/&gt;
connected to: repset/server1,server2,server3&lt;br/&gt;
exported 64 records&lt;/p&gt;

</comment>
                            <comment id="86319" author="colinmarc" created="Tue, 7 Feb 2012 23:00:36 +0000"  >&lt;p&gt;I&apos;m also having the same issue: exported 0 records. I tried with a very simple $or (always returns everything on the command line).&lt;/p&gt;


&lt;p&gt;$ /opt/mongodb/bin/mongoexport -vvvvvvv -h localhost:30000 -d lumberjack -c aggregates -q &quot;{&apos;$or&apos;: &lt;span class=&quot;error&quot;&gt;&amp;#91;{}&amp;#93;&lt;/span&gt;}&quot; --csv -f s,c -o export.csv&lt;br/&gt;
Tue Feb  7 22:58:55 creating new connection to:localhost:30000&lt;br/&gt;
Tue Feb  7 22:58:55 BackgroundJob starting: ConnectBG&lt;br/&gt;
Tue Feb  7 22:58:55 connected connection!&lt;br/&gt;
connected to: localhost:30000&lt;br/&gt;
exported 0 records&lt;/p&gt;</comment>
                            <comment id="78896" author="kabobbob" created="Tue, 10 Jan 2012 19:52:08 +0000"  >&lt;p&gt;I also am having the same issue:&lt;/p&gt;

&lt;p&gt;$ mongoexport --db forms_prod --collection form_templates --out autism_forms.json --query &quot;{ study_ids : &lt;/p&gt;
{ &apos;$in&apos; : [&quot;6&quot;], &apos;$nin&apos; : [&quot;2&quot;] }
&lt;p&gt; }&quot;&lt;br/&gt;
connected to: 127.0.0.1&lt;br/&gt;
exported 0 records&lt;/p&gt;

&lt;p&gt;I do a find inside of the mongo shell using the exact same query statement and it returns fine.&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>5.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>Tue, 10 Jan 2012 19:52:08 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        9 years, 10 weeks, 4 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>
                            9 years, 10 weeks, 4 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>kabobbob</customfieldvalue>
            <customfieldvalue>colinmarc</customfieldvalue>
            <customfieldvalue>ddunlop@forbes.com</customfieldvalue>
            <customfieldvalue>dwight@mongodb.com</customfieldvalue>
            <customfieldvalue>erickrdch</customfieldvalue>
            <customfieldvalue>y0ft88</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrolun:</customfieldvalue>

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

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

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