Note that there are some explanatory texts on larger screens.

plurals
  1. POassertion exception in mongo mapreduce
    primarykey
    data
    text
    <p>I have a collection that stores search query logs. It's two main attributes are user_id and search_query. user_id is null for a logged out user. I am trying to run a mapreduce job to find out the count and terms per user.</p> <pre> var map = function(){ if(this.user_id !== null){ emit(this.user_id, this.search_query); } } var reduce = function(id, queries){ return Array.sum(queries + ","); } db.searchhistories.mapReduce(map, reduce, { query: { "time" : { $gte : ISODate("2013-10-26T14:40:00.000Z"), $lt : ISODate("2013-10-26T14:45:00.000Z") } }, out : "mr2" } ) </pre> <p>throws the following exception</p> <pre> Wed Nov 27 06:00:07 uncaught exception: map reduce failed:{ "errmsg" : "exception: assertion src/mongo/db/commands/mr.cpp:760", "code" : 0, "ok" : 0 } </pre> <p>I looked at <a href="https://github.com/mongodb/mongo/blob/master/src/mongo/db/commands/mr.cpp#L760" rel="nofollow">mr.cpp L#760</a> but could not gather any vital information. What could be causing this?</p> <p>My Collection has values like</p> <pre> > db.searchhistories.find() { "_id" : ObjectId("5247a9e03815ef4a2a005d8b"), "results" : 82883, "response_time" : 0.86, "time" : ISODate("2013-09-29T04:17:36.768Z"), "type" : 0, "user_id" : null, "search_query" : "awareness campaign" } { "_id" : ObjectId("5247a9e0606c791838005cba"), "results" : 39545, "response_time" : 0.369, "time" : ISODate("2013-09-29T04:17:36.794Z"), "type" : 0, "user_id" : 34225174, "search_query" : "eficaz eficiencia efectividad" } </pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload