Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Commit

Permalink
Changed default functions on MapReduce UI
Browse files Browse the repository at this point in the history
  • Loading branch information
marcqualie committed Jun 26, 2012
1 parent a5561fa commit 62c845a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/controller/mapreduce.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,19 @@ public function after ()
// Set default values
if (!$this->params['query'])
{
$this->params['query'] = '{ "event": " .. " }';
$this->params['query'] = '{ "event": "" }';
}
if (!$this->params['sort'])
{
$this->params['sort'] = '{ "value": -1 }';
}
if (!$this->params['map-func'])
{
$this->params['map-func'] = "function () {\n \n}";
$this->params['map-func'] = "function () {\n emit(this.message, 1);\n}";
}
if (!$this->params['reduce-func'])
{
$this->params['reduce-func'] = "function (key, obj) {\n \n}";
$this->params['reduce-func'] = "function (key, obj) {\n var sum = 0;\n for (var i in obj) {\n sum += obj[i];\n }\n return sum;\n}";
}

}
Expand Down

0 comments on commit 62c845a

Please sign in to comment.