I am glad that you are aware of the feature and its advantages. The prefix
solution is a clever idea. It would certainly help, but I think it is to
restricted for the choice of IDs. Wouldn't it be possible to use an
existing type index as a pre filter? I guess every document should have a
type attribute and the database should have a type index.

Anyway, is the prefix solution on the release plan?

- Hans


On Sat, Jan 4, 2014 at 4:12 PM, Dirkjan Ochtman <[email protected]> wrote:

> 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