couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Shorin <kxe...@gmail.com>
Subject Re: Reduce function in couchdb
Date Tue, 10 Feb 2015 22:48:09 GMT
Use builtin reduce function _count:
http://docs.couchdb.org/en/latest/couchapp/ddocs.html#builtin-reduce-functions
--
,,,^..^,,,


On Mon, Feb 9, 2015 at 6:22 PM, Ayhan Kesenci
<a.kesenci89@googlemail.com> wrote:
> I would like to reduce a view to get the sum of some ids I have this view
>
> function(doc) {
>
> emit([doc.retweeted_status.user.id.toString(),doc.retweeted_status.user.lang.toString(),doc.retweeted_status.id.toString()]);
> }
>
>
>
> and would reduce to get the sum of doc_retweeted_status.id.toString()
>
>
> and try this to reduce, to get the value how many times a id exist in my
> couchdb
>
> Is it possible to use it like I imagine ?
>
> thank you guys

Mime
View raw message