On Sat, Jan 4, 2014 at 3:05 PM, Hans J Schroeder <[email protected]> wrote:
> What is the current status of CouchDB and hierarchical views? I am not sure
> if the idea has already been discussed, but it is a feature wich is really
> needed.

It's been discussed before, though not with this name. I don't think
"hierarchical views" is a good description of this feature, because to
make the initial pass fast you'd want to prevent passing documents to
the query serveer at all, such that the filtering level is
qualitatively different from the actual view procedure.

The best solution I've discussed so far (with Jan, I think -- but it's
been a while) is to have a the notion of a document "type" and affirm
the common usage of a "type:" prefix for document ID's by allowing
design documents to filter by the ID prefix (followed by a colon).
I.e., name your documents "user:[email protected]", then add a property
"types": ["user"] to a design document. Then, any views, filters, etc
in that design document will discard any documents whose ID does not
start with "user:" before passing it to a query server.

Cheers,

Dirkjan

Reply via email to