<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:58:32 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-1951] M/R output param should allow us to use db.collection not only collection  </title>
                <link>https://jira.mongodb.org/browse/SERVER-1951</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>
&lt;p&gt;Should add a field to out&lt;/p&gt;

&lt;p&gt;{ out : &lt;/p&gt;
{ merge : &quot;foo&quot; , db : &quot;other&quot; }
&lt;p&gt; }&lt;/p&gt;

&lt;p&gt;tricky part is filling in &quot;result&quot; field.&lt;br/&gt;
I think best solution is having it start with a .&lt;br/&gt;
so normal would be &quot;result&quot; ; &quot;foo&quot;  &lt;br/&gt;
with this would be &quot;.other.foo&quot;&lt;/p&gt;


&lt;p&gt;OLD:&lt;br/&gt;
We have &quot;rawdata&quot; on a DB, and reduced collections on a different DB. &lt;/p&gt;

&lt;p&gt;For us it could be interesting to do output=&apos;ReducedDB.NewReducedCollection&lt;/p&gt;

&lt;p&gt;This would help moving a lot of data from one DB to another One.&lt;/p&gt;

&lt;p&gt;Would be great in combination with this one:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://jira.mongodb.org/browse/SERVER-647&quot; class=&quot;external-link&quot; rel=&quot;nofollow&quot;&gt;http://jira.mongodb.org/browse/SERVER-647&lt;/a&gt;&lt;/p&gt;
</description>
                <environment></environment>
        <key id="13388">SERVER-1951</key>
            <summary>M/R output param should allow us to use db.collection not only collection  </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="9">Done</resolution>
                                        <assignee username="antoine">Antoine Girbal</assignee>
                                    <reporter username="amesas@gmail.com">Alberto</reporter>
                        <labels>
                    </labels>
                <created>Fri, 15 Oct 2010 14:02:54 +0000</created>
                <updated>Tue, 12 Jul 2016 00:17:11 +0000</updated>
                            <resolved>Mon, 24 Jan 2011 03:28:33 +0000</resolved>
                                                    <fixVersion>1.7.5</fixVersion>
                                    <component>Querying</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="22616" author="antoine" created="Mon, 24 Jan 2011 03:28:33 +0000"  >&lt;p&gt;resolved and added test&lt;/p&gt;</comment>
                            <comment id="22505" author="antoine" created="Wed, 19 Jan 2011 08:19:37 +0000"  >&lt;p&gt;for sharding, had to modify 2 things:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;mongos: needs to look at the &quot;out&quot; field and if there is a db, determine the primary shard for that db, and use that shard to generate the result.&lt;/li&gt;
	&lt;li&gt;mongod: MapReduceFinishCommand needs extra ouput fields&lt;/li&gt;
&lt;/ul&gt;
</comment>
                            <comment id="22504" author="auto" created="Wed, 19 Jan 2011 08:16:57 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1951&quot; title=&quot;M/R output param should allow us to use db.collection not only collection  &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1951&quot;&gt;&lt;del&gt;SERVER-1951&lt;/del&gt;&lt;/a&gt;: support for output to other DB with sharding. Test in jstests/sharding/bigMapReduce.js&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/1830f9cb5e948abcf5e0fa300b941f46a7c57b27&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/1830f9cb5e948abcf5e0fa300b941f46a7c57b27&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="22493" author="antoine" created="Tue, 18 Jan 2011 21:10:40 +0000"  >&lt;p&gt;re: sharding&lt;br/&gt;
looks like the collection gets properly created in db, but mongos does not show the new collection..&lt;/p&gt;

&lt;p&gt;From shell connected to mongos:&lt;br/&gt;
&amp;gt; a = db.users.mapReduce(map, reduce, {out: { replace : &quot;out&quot;, db: &quot;testdb&quot;}});&lt;br/&gt;
{&lt;br/&gt;
	&quot;result&quot; : &quot;out&quot;,&lt;br/&gt;
	&quot;shardCounts&quot; : {&lt;br/&gt;
		&quot;localhost:27018&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 1293,
			&quot;emit&quot; : 1293,
			&quot;output&quot; : 1293
		}
&lt;p&gt;,&lt;br/&gt;
		&quot;localhost:27020&quot; : &lt;/p&gt;
{
			&quot;input&quot; : 709,
			&quot;emit&quot; : 709,
			&quot;output&quot; : 709
		}
&lt;p&gt;	},&lt;br/&gt;
	&quot;counts&quot; : &lt;/p&gt;
{
		&quot;emit&quot; : NumberLong(2002),
		&quot;input&quot; : NumberLong(2002),
		&quot;output&quot; : NumberLong(2002)
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1,&lt;br/&gt;
	&quot;timeMillis&quot; : 120,&lt;br/&gt;
	&quot;timing&quot; : &lt;/p&gt;
{
		&quot;shards&quot; : 73,
		&quot;final&quot; : 47
	}
&lt;p&gt;,&lt;br/&gt;
}&lt;br/&gt;
&amp;gt; use testdb&lt;br/&gt;
switched to db testdb&lt;br/&gt;
&amp;gt; show collections&lt;br/&gt;
&amp;gt; db.out.find()&lt;br/&gt;
&amp;gt;&lt;/p&gt;

&lt;p&gt;But then if I log into 1st shard directly..&lt;br/&gt;
$ ./mongo --port 27018&lt;br/&gt;
MongoDB shell version: 1.7.5-pre-&lt;br/&gt;
connecting to: 127.0.0.1:27018/test&lt;br/&gt;
&amp;gt; use testdb&lt;br/&gt;
switched to db testdb&lt;br/&gt;
&amp;gt; db.out.find()&lt;/p&gt;
{ &quot;_id&quot; : &quot;Girbal&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;aazpcvqvvf&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;abhuxeyusd&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;ablyriddck&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;abvwdmzach&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;abwshxeuis&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;acckexkccm&quot;, &quot;value&quot; : 1 }
{ &quot;_id&quot; : &quot;aefdqlxiod&quot;, &quot;value&quot; : 1 }

&lt;p&gt;is it that mongos needs to update its map of NS?&lt;/p&gt;</comment>
                            <comment id="22449" author="eliot" created="Mon, 17 Jan 2011 16:52:34 +0000"  >&lt;p&gt;Isn&apos;t working sharded.&lt;/p&gt;</comment>
                            <comment id="22135" author="antoine" created="Thu, 6 Jan 2011 06:09:46 +0000"  >&lt;p&gt;added test in jstests/mr_replaceIntoDB.js&lt;/p&gt;</comment>
                            <comment id="22134" author="auto" created="Thu, 6 Jan 2011 06:09:03 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;agirbal&apos;, u&apos;name&apos;: u&apos;agirbal&apos;, u&apos;email&apos;: u&apos;antoine@10gen.com&apos;}
&lt;p&gt;Message: &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-1951&quot; title=&quot;M/R output param should allow us to use db.collection not only collection  &quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-1951&quot;&gt;&lt;del&gt;SERVER-1951&lt;/del&gt;&lt;/a&gt;: M/R output param should allow us to use db.collection not only collection&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/da0bc2917778593d0368b89427d9d504a1230389&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/da0bc2917778593d0368b89427d9d504a1230389&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="22133" author="antoine" created="Thu, 6 Jan 2011 04:00:18 +0000"  >&lt;p&gt;ok this is implemented&lt;/p&gt;

&lt;p&gt;foo:PRIMARY&amp;gt; db.users.mapReduce(map, reduce, {out: { replace : &quot;outcoll&quot;, db:&quot;testdb&quot;}});&lt;br/&gt;
{&lt;br/&gt;
	&quot;result&quot; : &lt;/p&gt;
{
		&quot;db&quot; : &quot;testdb&quot;,
		&quot;collection&quot; : &quot;outcoll&quot;
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;timeMillis&quot; : 1154,&lt;br/&gt;
	&quot;counts&quot; : &lt;/p&gt;
{
		&quot;input&quot; : 4000,
		&quot;emit&quot; : 4000,
		&quot;output&quot; : 4000
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1,&lt;br/&gt;
}&lt;br/&gt;
foo:PRIMARY&amp;gt; db.users.mapReduce(map, reduce, {out: { replace : &quot;outcoll&quot;}});&lt;br/&gt;
{&lt;br/&gt;
	&quot;result&quot; : &quot;outcoll&quot;,&lt;br/&gt;
	&quot;timeMillis&quot; : 651,&lt;br/&gt;
	&quot;counts&quot; : &lt;/p&gt;
{
		&quot;input&quot; : 4000,
		&quot;emit&quot; : 4000,
		&quot;output&quot; : 4000
	}
&lt;p&gt;,&lt;br/&gt;
	&quot;ok&quot; : 1,&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="22130" author="eliot" created="Thu, 6 Jan 2011 02:50:11 +0000"  >&lt;p&gt;We use that notation in a few places, but it is a bit subtle.&lt;/p&gt;

&lt;p&gt;resultDB is ok.&lt;/p&gt;

&lt;p&gt;One thing to keep in mind is we&apos;ll probably add an option to write result to an arbitrary server/db/collection at some point as well.&lt;/p&gt;</comment>
                            <comment id="22129" author="antoine" created="Thu, 6 Jan 2011 00:56:40 +0000"  >&lt;p&gt;I&apos;m not sure the &quot;.other.foo&quot; is the most intuitive way to represent, may look like a bug to ppl.&lt;br/&gt;
Unless we use this notation in other places, i.e. a &quot;.&quot; to mean other db?&lt;br/&gt;
If not, why not use another result field with &quot;db&quot; : &quot;other&quot; or &quot;resultDB&quot;:&quot;other&quot;.&lt;br/&gt;
If user is already explicitly asking for other db, then they are already aware of where collection will be, and otherwise the &quot;db&quot;:&quot;other&quot; will remind them.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Depends</name>
                                                                <inwardlinks description="is depended on by">
                                                        </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>10.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Thu, 6 Jan 2011 00:56:40 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        13 years, 4 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>
                            13 years, 4 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>amesas@gmail.com</customfieldvalue>
            <customfieldvalue>antoine</customfieldvalue>
            <customfieldvalue>auto</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|hrpd2n:</customfieldvalue>

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

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

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