opensearch-sdk-java
opensearch-sdk-java copied to clipboard
[FEATURE] Implement custom list settings for extensions
Is your feature request related to a problem?
Part of #148
List Settings will be simple to implement after #154 is completed:
- A
ListSettingis just aSetting<List<T>> - Internally, settings are stored as Strings so this is just a list of Strings
- The
ListSettingjust needs the parser for each element of the list
What solution would you like?
A new SettingType for List will be required to handle these, but otherwise should parallel the other implementations. Passing the List<String> and parser (per #154) should allow reconstructing values.
What alternatives have you considered?
Pre-parsing lists into delimited Strings. This is somewhat doable with the existing implementation (other than choosing a delimiter) and could be implemented quickly if needed. But doing it with functional interfaces for a parser is the "right way" to do it.
Do you have any additional context?
https://xkcd.com/171/