-1

I'm new in CouchDB and I'm wondering if is possible and how is possible to sort a view in CouchDB.

PS: I'm using CouchDB 3.0.0

  • 2
    Yes. Take advantage of [view collation](https://docs.couchdb.org/en/stable/ddocs/views/collation.html). Otherwise you'll have to post process for sort. Also read over the [pagination recipe](https://docs.couchdb.org/en/stable/ddocs/views/pagination.html) for inspiration. – RamblinRose May 04 '20 at 18:31

1 Answers1

0

Yes, it is possible to sort views. In fact, all views are always sorted. It's impossible to not sort a view.

Each view is sorted according to the collation rules for the key emitted from the map function.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189