You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
add a method IndexOperations.createWithMapping() (different variants for providing mapping and settings) that will create an index with settings and mappings in one single call. This is needed for being able to have index sorting and would rely on the setting being provided as a json file (like it is actually already possible) (issue Create index with mapping in one step #1718).
Extend the existing @Setting annotation to take settings parameters, for example the index sorting values. We could also move the existing index settings parameters from the @Document annotation. This would allow for a configuration without using json files (issue Configure index settings with @Setting annotation #1719).
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.
The text was updated successfully, but these errors were encountered: