incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anand Chitipothu <anandol...@gmail.com>
Subject how to count the number of unique values
Date Tue, 12 Oct 2010 13:09:28 GMT
Is it possible to count the number of unique values by writing a couchdb view?

A typical example is to find the number of tags in a blog application.

Consider the following 2 docs.

{
    "_id": "posts/1",
    "title": "post 1",
    "tags": ["foo", "bar"]
}

{
    "_id": "posts/2",
    "title": "post 2",
    "tags": ["foo", "foobar"]
}

Is it possible to find that there are 3 tags?

Anand

Mime
View raw message