couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <>
Subject group_level in reduce function
Date Wed, 24 Mar 2010 16:34:38 GMT
Hi everyone,

I'm learning how to use CouchDB for a few days and I must say I am thrilled to use it on production
"Thank the makers" :)

At first, I had a rough time understanding how 'rereduce' worked, and how to comply with 'reduce'
constraints for a non-trivial algorithm. I changed the specification a bit to be able to do
it with an associative and commutative 'reduce' function.

My next step would be to choose a different 'reduce' algorithm depending on 'group_level'.
In order to get 'group_level' from the 'reduce' function, I thought about comparing keys in
order to determine which level is the same, however it is time-consuming and could be false
in particular settings (when there is only one [X,_] per [X] in the 'map' results).

Is there an easier and safer way to get 'group_level' from a 'reduce' function?



View raw message