This looks a lot like get_index_settings.  Can we refactor?