couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hahn <m...@hahnca.com>
Subject Re: Get all documents of a certain type.
Date Tue, 06 Nov 2012 22:30:38 GMT
A view that emitted (_id, sku) would be the easiest and most efficient way
to do it.  You wouldn't have to include_docs.

On Tue, Nov 6, 2012 at 2:05 PM, Simon Metson <simon@cloudant.com> wrote:

> Hi,
> You can query with ?startkey=product&endkey=productZZZZ&include_docs=true
> to get all the product docs back.
>
> If they contain a lot more info than just the SKU's I'd make  a view.
> Cheers
> Simon
>
>
> On Tuesday, 6 November 2012 at 21:58, Kevin Burton 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.
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message