Added new reducers to the list of MapReduce reducers in the pull-down list
of the view editor. New items added:
'_top_1', '_top_10', '_top_100', '_bottom_1', '_bottom_10', '_bottom_100', '_first', '_last'
that is three example reducers for the _top_x & _bottom_x reducers, because they can take any number
between 1 and 100, and that would be too many for this list. If users wanted to use _top_3, say, they
would have to select the CUSTOM reducer and type _top_3 into the text field.
diff --git a/app/addons/documents/index-editor/reducers.js b/app/addons/documents/index-editor/reducers.js
index 51988f6..e5b8c05 100644
--- a/app/addons/documents/index-editor/reducers.js
+++ b/app/addons/documents/index-editor/reducers.js
@@ -16,7 +16,7 @@
const defaultMap = 'function (doc) {\n emit(doc._id, 1);\n}';
const defaultReduce = 'function (keys, values, rereduce) {\n if (rereduce) {\n return sum(values);\n } else {\n return values.length;\n }\n}';
-const builtInReducers = ['_sum', '_count', '_stats', '_approx_count_distinct'];
+const builtInReducers = ['_sum', '_count', '_stats', '_approx_count_distinct', '_top_1', '_top_10', '_top_100', '_bottom_1', '_bottom_10', '_bottom_100', '_first', '_last'];
const allReducers = builtInReducers.concat(['CUSTOM', 'NONE']);
const initialState = {