From 08a10b459e653669eb06deac3d2637340a23373a Mon Sep 17 00:00:00 2001 From: alphinside Date: Wed, 14 Dec 2022 05:38:21 +0700 Subject: [PATCH] fix: remove offset index create on list like false Signed-off-by: alphinside --- docarray/array/storage/elastic/backend.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docarray/array/storage/elastic/backend.py b/docarray/array/storage/elastic/backend.py index 1513987a4a5..c3e89fb46f8 100644 --- a/docarray/array/storage/elastic/backend.py +++ b/docarray/array/storage/elastic/backend.py @@ -126,7 +126,9 @@ def _ensure_unique_config( return config_joined def _build_offset2id_index(self): - if not self._client.indices.exists(index=self._index_name_offset2id): + if self._list_like and not self._client.indices.exists( + index=self._index_name_offset2id + ): self._client.indices.create(index=self._index_name_offset2id, ignore=[404]) def _build_schema_from_elastic_config(self, elastic_config):