Select top/latest 10 in couchdb?

Posted by drozzy on Stack Overflow See other posts from Stack Overflow or by drozzy
Published on 2010-04-06T03:31:15Z Indexed on 2010/04/06 3:33 UTC
Read the original article Hit count: 157

Filed under:

How would I execute a query equivalent to "select top 10" in couch db?

For example I have a "schema" like so:

title   body   modified

and I want to select the last 10 modified documents.

As an added bonus if anyone can come up with a way to do the same only per category. So for:

title   category   body   modified

return a list of latest 10 documents in each category.

I am just wandering if such a query is possible in couchdb.

© Stack Overflow or respective owner

Related posts about couchdb