couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Ludwig <>
Subject Re: MultiKey sorting in views
Date Tue, 13 Apr 2010 20:05:11 GMT
Pavan Kumar schrieb am 13.04.2010 um 09:33:09 (+0530):

>   I have documents with author and submitted time ( utc value of
> date ) fields . Now i need to sort descending ( i.e latest first )
> on time and filter by author in a view.

I think the underlying issue which makes this impossible in CouchDB
without add-on is that the engine does just one pass [*] over an index
for either an identity or a range query, and there simply isn't any
provision for sorting other than by the very index the query uses.

[*] My understanding of the engine is very limited, but I guess that
a second pass must be performed to merge results from several instances
in order to produce a sorted result. Still, this is just a merge, so in
the context of sorting, it is a one-pass conceptually.

Please correct me if I'm mistaken in any of my half-blind assumptions.

Michael Ludwig

View raw message