Closed
Description
I'm using Spring Data for Elasticsearch. I need to create an index with an index sorting as it is described here
There is no way to define a POJO field to be used as a sorting field during indexing
Reply from P.J.Meisch:
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.