Here’s a quick reason why the index is not used for sorting.
ESR [Equality Sort Range]
{ “user.login”: /^ir.*/ } : This is a range
The only index is {“user.login”:1, “user.date”: -1}, since there is no Equality and you cannot use this index for Sort as the first index is user.login, you can only use this index for range.
So, if the index was {“user.date”: -1, “user.login”:1}, then yes this index will be utilize for the sort stage and then follow by the range ~