We had sort by _uid in elastic 5.x that is now deprecated
We upgraded existing 5.x data and elastic 6.8.3 is using it fine
but the sort fails
We changed the code to sort by _id, that works for newly created index
but the old one seems to be 5.x compatible still and the sort fails
"Fielddata access on the _id field is disallowed"
I had the same issue. An index restored from 5.6 to a 6.8 cluster is throwing the error.
To solve it I created a new index with the same mappings and reindexed the data.