Sort documents by activity