Collation functions for PouchDB map/ reduce and search plugins.