Currently this is not possible. Index sorting must be defined when the index is created, and as it is currently possible to define a json file with index settings and add that with @Setting to the entity, this fails in this case. The reason is, that when an index sorting is defined, the corresponding field must be defined in the mappings definition on index creation as well. Spring Data Elasticsearch first creates the index with the settings and after that it writes the mappings - which then is too late.
Please open an issue in the issue tracker that the index creation with index sorting should be possible, we have to think about how to define the sort fields.
Edit 28.03.2021:
From Spring Data Elasticsearch 4.2.0.RC1 on index creation will always be in one step with writing the mapping, so it's possible to provide a settings file that will be used along with the mapping.
It is as well possible now to define the index sorting parameters with arguments of the @Setting annotation, so no need for a json file at all.