opensearch-sdk-java icon indicating copy to clipboard operation
opensearch-sdk-java copied to clipboard

[FEATURE] Implement custom list settings for extensions

Open dbwiddis opened this issue 3 years ago • 0 comments

Is your feature request related to a problem?

Part of #148

List Settings will be simple to implement after #154 is completed:

  • A ListSetting is just a Setting<List<T>>
  • Internally, settings are stored as Strings so this is just a list of Strings
  • The ListSetting just 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/

dbwiddis avatar Sep 20 '22 05:09 dbwiddis