Added some sorting in based on actual indexed fields and setup indexing for sorted date at document level