Description
edovac opened DATAES-987 and commented
Given an index with at least one alias, when using IndexOperations to retrieve index mapping using the alias instead of the index name the library throws a NullPointerException.
The same code worked fine with version 4.0
It seems that the code in DefaultIndexOperations#doGetMappings(IndexCoordinates) has been changed. It looks up the map using the alias name, but the map contains only index names as keys. Elasticserach itself allows getting the mappings using an alias, but always returns the mappings for all the indices having the alias.
I know that using an alias to retrieve indices information can be ambiguous, since it there's no guarantee that all indices with the same alias provide a coherent mappings section.
Attached you can find a test showing this behaviour
Affects: 4.1.1 (2020.0.1)
Attachments:
- MappingTest.java (2.53 kB)
Referenced from: pull request #560
Backported to: 4.1.2 (2020.0.2)