Skip to content

Commit 2aa62cc

Browse files
Fetch settings for alias and save as alias name, not index
1 parent f7f85a5 commit 2aa62cc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

elasticsearch_dsl/index.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -504,9 +504,12 @@ def get_settings(self, using=None, **kwargs):
504504
Any additional keyword arguments will be passed to
505505
``Elasticsearch.indices.get_settings`` unchanged.
506506
"""
507-
return self._get_connection(using).indices.get_settings(
507+
settings = self._get_connection(using).indices.get_settings(
508508
index=self._name, **kwargs
509509
)
510+
if self._name not in settings:
511+
settings[self._name] = list(settings.values())[0]
512+
return settings
510513

511514
def put_settings(self, using=None, **kwargs):
512515
"""

0 commit comments

Comments
 (0)