incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aurélien Bénel <aurelien.be...@utt.fr>
Subject Re: Sort "join" view
Date Sat, 16 Nov 2013 07:20:32 GMT
Hello Tim,

> Given docs of two types (category and item) how would I produce a view grouping items
with their category, ordered by name. (…)

Don’t assume to do exactly with Map/Reduce what you did with a relational model.Try to do
everything that is computationally expensive and can be done with an index.

> I thought about using category name in its ID, so it would use that for sorting, but
that would mean updating ID on the category and updating all its items every time the name
changed.

I would personally do that. 

In different settings, you could have “emulated” simple relational joins : http://stackoverflow.com/questions/19431946
But not in your case.


Regards,

Aurélien
Mime
View raw message