couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wout Mertens <>
Subject Re: View Intersections
Date Fri, 10 Apr 2009 17:04:30 GMT

On Apr 10, 2009, at 11:46 AM, Sho Fukamachi wrote:

> the obvious followup question to those examples is "well, how do I  
> find a document with all of (n) tags?".

How about this algorithm. Needed: tagcount view and document-by-tag view

- given a list of tags that the document should have
- find the tag that has the lowest document count with the tagcount view
- request all documents with that tag through the document-by-tag view
- filter manually on documents that match

If that would mean too many documents, make a view that emits all  
combinations of 2 tags a document has, that way you filter by that  
much more.

It would be neat if one could post a temporary view that runs against  
a subset of the output of a real view. That way the viewserver farm  
could do the filtering...


View raw message