-
Type: Task
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:None
-
Query 2019-11-04
The following runs this example M/R: https://docs.mongodb.com/manual/reference/command/mapReduce/#return-the-total-price-per-customer
> db.orders.find() { "_id" : ObjectId("50a8240b927d5d8b5891743c"), "cust_id" : "abc123", "ord_date" : ISODate("2012-10-04T04:00:00Z"), "status" : "A", "price" : 25, "items" : [ { "sku" : "mmm", "qty" : 5, "price" : 2.5 }, { "sku" : "nnn", "qty" : 5, "price" : 2.5 } ] } { "_id" : ObjectId("5da5c295dc647eaad8d02f9d"), "cust_id" : "abc123", "ord_date" : ISODate("2012-10-04T04:00:00Z"), "status" : "A", "price" : 35, "items" : [ { "sku" : "mmm", "qty" : 5, "price" : 2.5 }, { "sku" : "nnn", "qty" : 5, "price" : 2.5 } ] } { "_id" : ObjectId("5da5c2a2dc647eaad8d02f9e"), "cust_id" : "abc123", "ord_date" : ISODate("2012-10-04T04:00:00Z"), "status" : "A", "price" : 40, "items" : [ { "sku" : "mmm", "qty" : 5, "price" : 2.5 }, { "sku" : "nnn", "qty" : 5, "price" : 2.5 } ] } { "_id" : ObjectId("5da5c2aedc647eaad8d02f9f"), "cust_id" : "abc123", "ord_date" : ISODate("2012-10-04T04:00:00Z"), "status" : "A", "price" : 45, "items" : [ { "sku" : "mmm", "qty" : 5, "price" : 2.5 }, { "sku" : "nnn", "qty" : 5, "price" : 2.5 } ] } { "_id" : ObjectId("5da5c2bbdc647eaad8d02fa0"), "cust_id" : "abc123", "ord_date" : ISODate("2012-10-04T04:00:00Z"), "status" : "A", "price" : 50, "items" : [ { "sku" : "mmm", "qty" : 5, "price" : 2.5 }, { "sku" : "nnn", "qty" : 5, "price" : 2.5 } ] } > db.orders.mapReduce( mapFunction1, reduceFunction1, { out: {inline: 1}, sort: {price1: 1}, limit: 1 } ) 2019-10-15T10:33:15.339-0400 E QUERY [js] uncaught exception: Error: map reduce failed:{ "ok" : 0, "errmsg" : "Attempting to use external sort without setting SortOptions::tempDir", "code" : 17149, "codeName" : "Location17149" } : _getErrorWithCode@src/mongo/shell/utils.js:25:13 DBCollection.prototype.mapReduce@src/mongo/shell/collection.js:1047:15 @(shell):1:1 >
- duplicates
-
SERVER-44013 MR Agg: Report plan stats and summary for currentOp/profiler/slow query logging
- Closed
- is related to
-
SERVER-44013 MR Agg: Report plan stats and summary for currentOp/profiler/slow query logging
- Closed