summaryrefslogtreecommitdiff
path: root/jstests/mr_index2.js
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2010-12-16 16:38:24 -0500
committerEliot Horowitz <eliot@10gen.com>2010-12-16 16:41:28 -0500
commitc0fa67131864a2f2c5cf59f7cb83eb8612ab40b8 (patch)
treece7abb68c8b2bc609b085597eb1d4747e5cbbb15 /jstests/mr_index2.js
parentc2496691f11bab8bef8e9a1cbce0d356577d09cd (diff)
downloadmongo-c0fa67131864a2f2c5cf59f7cb83eb8612ab40b8.tar.gz
map/reduce no longer uses temp collections.
you have to specify out SERVER-1837
Diffstat (limited to 'jstests/mr_index2.js')
-rw-r--r--jstests/mr_index2.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/mr_index2.js b/jstests/mr_index2.js
index 0a8b19bdc37..a8d845ed69d 100644
--- a/jstests/mr_index2.js
+++ b/jstests/mr_index2.js
@@ -7,16 +7,16 @@ t.save( { arr : [1, 2] } )
map = function() { emit(this._id, 1) }
reduce = function(k,vals) { return Array.sum( vals ); }
-res = t.mapReduce(map,reduce, { query : {} })
+res = t.mapReduce(map,reduce, { out : "mr_index2_out" , query : {} })
assert.eq( 1 ,res.counts.input , "A" )
res.drop()
-res = t.mapReduce(map,reduce, { query : { arr: {$gte:0} } })
+res = t.mapReduce(map,reduce, { out : "mr_index2_out" , query : { arr: {$gte:0} } })
assert.eq( 1 ,res.counts.input , "B" )
res.drop()
t.ensureIndex({arr:1})
-res = t.mapReduce(map,reduce, { query : { arr: {$gte:0} } })
+res = t.mapReduce(map,reduce, { out : "mr_index2_out" , query : { arr: {$gte:0} } })
assert.eq( 1 ,res.counts.input , "C" )
res.drop();