couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Landolt <>
Subject Re: view intersections?
Date Sun, 11 Jan 2009 20:17:46 GMT
On Sun, Jan 11, 2009 at 2:11 PM, Jeff Hinrichs - DM&T <>wrote:

> I've been reading and googling trying to figure out the proper way to
> do an intersection of views.
> The database has documents with an attribute of tags (a list)
> ['copper','blue','hot','long','twisted']
> If I wanted to find all documents that had the tags of 'copper' and
> 'blue' what is the preferred way?  I could index all the elements of
> the tags list and then perform two requests key='copper' and
> key='blue' and have the client do the intersection.  Is there a way to
> have couchdb do the lifting on this one?
> Along the same line, what of the union of tags. 'copper' or 'blue'

Two requests, then merge on the client. It's not really a pattern that fits
the map/reduce paradigm well. I don't know the status of the fti
integration, but once that goes down there should be more efficient ways to
handle this.

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