incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From umut utkan <umut.ut...@gmail.com>
Subject Re: Question about views
Date Tue, 28 Apr 2009 12:11:37 GMT
Hi Wout,

I have a product catalog which contains categories just like eBay. And every
product under a common category has some common attributes like; vendor,
type, size, etc. (again just like eBay:)) And in the front-end I want to
provide a category browsing widget using this common attributes. I could
create views for every possible subcategory but this does not seem feasible
to me. Also the order of these subcategories could change;
television>sony>40 inch could become television>40 inch>sony in the future.
What I want is a flexible way of representing categories/subcategories and
the products under them.

Thanks.

Umut

On Tue, Apr 28, 2009 at 2:46 PM, Wout Mertens <wout.mertens@gmail.com>wrote:

> On Apr 28, 2009, at 12:04 PM, umut utkan wrote:
>
>  Actually what I want  is to pass custom query parameters --other than the
>> ones explained in HTTP view API--
>> to my views so that I can use them in map/reduce functions.
>>
>
> Oh. That won't work, since map and reduce functions should always give the
> same answer for a given set of documents.
>
> You can output different results for predefined questions, because the key
> of the view can be an array. For example, you could sort on last name and
> first name in the same view by emitting ([0,doc.first],doc) and
> ([1,doc.last],doc) (although 2 views would be better).
>
> Can't you give a very concrete example of what you're trying to achieve?
>
> Wout.

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