incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Victor Nicollet <vnicol...@runorg.com>
Subject Re: noobie problem getting view results
Date Sun, 04 Sep 2011 12:50:41 GMT
Hello,

You're querying for the design document itself, so that is what you are
receiving. To get the contents of a specific view, you need to ask for that
view:

http://localhost:5984/better1/_design/all_products/_view/all_products

You may want to peek at the Wiki on that topic for more information :
http://wiki.apache.org/couchdb/HTTP_view_API

-- VN

On 4 September 2011 14:06, Larry White <ljw1001@gmail.com> wrote:

> Hi,
> I'm sending a query that looks like this:
>
> http://localhost:5984/better1/_design/all_products
>
> and I get the view query text, instead of the results:
>
>
> {"_id":"_design/all_products","_rev":"5-0263a7865636ac57eae960b8ad2b63ac","language":"javascript","views":{"all
> products":{"map":"function(doc) {\n if (doc.drr_class=='Product') {
> \n\temit(null, doc); \n\t} \n}"}}}
>
> How do I get the actual results (ie a list of 'products'). It works
> fine from within the Couchbase web interface.
>
> Thanks much.
>

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