diff --git a/index/opensearch.py b/index/opensearch.py index 941e248..cad23ec 100644 --- a/index/opensearch.py +++ b/index/opensearch.py @@ -37,7 +37,7 @@ def create_index(self, index_name: str = "", body: Dict = {}) -> None: def refresh_index(self, index_name: str = "") -> None: index_name = self.get_index_name(index_name) - if self.index_exists(index_name): + if not self.index_exists(index_name): return self._search_engine.indices.refresh( index=index_name,