incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: Get all documents of a certain type.
Date Tue, 06 Nov 2012 22:07:35 GMT

On Nov 6, 2012, at 1:58 PM, Kevin Burton <rkevinburton@charter.net> wrote:

> In my Couch database I have a mixture of documents. The documents that I am
> interested in have an Id of 'product-xxxxxxx' or 'order-xxxxxx'. The
> "product" documents have a property of SKU that is a string. I would like to
> form a query to get a list of all the product SKUs. Does this require a view
> in the design document or can it be done all in one request? Thank you.

It requires a view. Its map function should do something like emitting as a key the SKU property
of each document whose ID indicates it’s a product.

—Jens
Mime
View raw message