In our test environment we have been indexing documents with a date data type with this format yyyy-MM-ddTHH:mm:ssZ, and using that for searching and sorting. However we were trying to do pagination and since we have many documents with the same date, the same documents might appear on different pages during searches.
To solve this we added a new integer mapping and sort by both the date and the integer and get a consistent sort each time. This however has slowed down the search speed.
We are considering adding a date_nanos field to use for both searching and sorting.
My question is if we replace date with date_nanos field how hard will it impact the search performance. Should we use a date_nanos just for sorting and date for searching or just use one for both?