If you emit things in a view, they're sorted by JSON values. Check out: http://wiki.apache.org/couchdb/ViewCollation
In your book example, doing something like: emit([doc.title, doc.chapter, doc.subchapter], null) ; would give you a view that had books ordered by chapter and subchapter. You could also do some nice stuff with the reduce functions to make that a "get list of books" get list of chapters for book", etc. HTH, Paul On Thu, Jul 17, 2008 at 4:53 PM, Patrick Aljord <[EMAIL PROTECTED]> wrote: > Hey all, > > What's the best way to deal with ordered list of documents, like if a > chapter has a list of sub-chapters that should be retrieved in order > so I can sort them by first sub-chapter, second, third etc? in mysql > that would be auto-increment I guess but how about couchdb? > > Thanks in advance, > > Pat >
