If there's a limited number of TYPEs, then emit a view like this: emit([doc.type, doc.price], ...
and query like /.../_view/...?startkey=["tv", 100]&endkey=["tv",1000] A On Fri, Oct 30, 2009 at 10:36 AM, Duy Nguyen <[email protected]>wrote: > Hi guys, > I have a troublesome sql query that needs to translate to couchDB > map/reduce > SELECT * FROM PRODUCTSWHERE [ PRICE ] AND [TYPE]' > Please note that Price and Type are dynamically generated depend on user > inputs. ( i.e TYPEcan be 100 < PRICE < 1000, or 1 < PRICE < 100, or 1000 > < PRICE < 10000. TYPE could be 'computer' , 'tv' etc..) > I can not do dynamically query on the fly with CouchDB. what is the best > way to solve this problem ? > > >
