Ignore exception of empty index. (#5030)

### What problem does this PR solve?

### Type of change


- [x] Refactoring
This commit is contained in:
Kevin Hu
2025-02-17 15:59:55 +08:00
committed by GitHub
parent 2ddf278e2d
commit 3aa5c2a699
2 changed files with 6 additions and 6 deletions

View File

@ -113,7 +113,7 @@ class ESConnection(DocStoreConnection):
except Exception:
logger.exception("ESConnection.deleteIdx error %s" % (indexName))
def indexExist(self, indexName: str, knowledgebaseId: str) -> bool:
def indexExist(self, indexName: str, knowledgebaseId: str = None) -> bool:
s = Index(indexName, self.es)
for i in range(ATTEMPT_TIME):
try: