flimzy commented on a change in pull request #279: Expand docs on builtin 
reducers, add _approx_count_distinct
URL: 
https://github.com/apache/couchdb-documentation/pull/279#discussion_r191261676
 
 

 ##########
 File path: src/ddocs/ddocs.rst
 ##########
 @@ -116,17 +116,25 @@ single value - which could be an array or similar object.
 Built-in Reduce Functions
 ^^^^^^^^^^^^^^^^^^^^^^^^^
 
-Additionally, CouchDB has three built-in reduce functions. These are 
implemented
-in Erlang and run inside CouchDB, so they are much faster than the equivalent
-JavaScript functions: ``_sum``, ``_count`` and ``_stats``. Their equivalents in
-JavaScript:
+Additionally, CouchDB has a set of built-in reduce functions. These are
+implemented in Erlang and run inside CouchDB, so they are much faster than the
+equivalent JavaScript functions.
 
-.. code-block:: javascript
+.. data:: _approx_count_distinct
 
-    // could be replaced by _sum
-    function(keys, values) {
-        return sum(values);
-    }
+Since version `2.2.0`.
+
+Aproximates the number of distinct keys in a view index using a variant of the
+HyperLogLog algorithm. This algorithm enables an efficient, parallelizable
 
 Review comment:
   Perhaps we can provide a link to an explanation of this algorithm for those 
(like me) who have never heard of it? Maybe just 
https://en.wikipedia.org/wiki/HyperLogLog ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to