when using sort add _sort field which contains name/order/value of the document's values used for sorting, so it can be re-sorted during the reduce