[SERVER-1951] M/R output param should allow us to use db.collection not only collection Created: 15/Oct/10 Updated: 12/Jul/16 Resolved: 24/Jan/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 1.7.5 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Alberto | Assignee: | Antoine Girbal |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Description |
|
Should add a field to out { out : { merge : "foo" , db : "other" }} tricky part is filling in "result" field. OLD: For us it could be interesting to do output='ReducedDB.NewReducedCollection This would help moving a lot of data from one DB to another One. Would be great in combination with this one: http://jira.mongodb.org/browse/SERVER-647 |
| Comments |
| Comment by Antoine Girbal [ 24/Jan/11 ] |
|
resolved and added test |
| Comment by Antoine Girbal [ 19/Jan/11 ] |
|
for sharding, had to modify 2 things:
|
| Comment by auto [ 19/Jan/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Antoine Girbal [ 18/Jan/11 ] |
|
re: sharding From shell connected to mongos: , }, , , But then if I log into 1st shard directly.. is it that mongos needs to update its map of NS? |
| Comment by Eliot Horowitz (Inactive) [ 17/Jan/11 ] |
|
Isn't working sharded. |
| Comment by Antoine Girbal [ 06/Jan/11 ] |
|
added test in jstests/mr_replaceIntoDB.js |
| Comment by auto [ 06/Jan/11 ] |
|
Author: {u'login': u'agirbal', u'name': u'agirbal', u'email': u'antoine@10gen.com'}Message: |
| Comment by Antoine Girbal [ 06/Jan/11 ] |
|
ok this is implemented foo:PRIMARY> db.users.mapReduce(map, reduce, {out: { replace : "outcoll", db:"testdb"}}); , , , |
| Comment by Eliot Horowitz (Inactive) [ 06/Jan/11 ] |
|
We use that notation in a few places, but it is a bit subtle. resultDB is ok. One thing to keep in mind is we'll probably add an option to write result to an arbitrary server/db/collection at some point as well. |
| Comment by Antoine Girbal [ 06/Jan/11 ] |
|
I'm not sure the ".other.foo" is the most intuitive way to represent, may look like a bug to ppl. |