We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b347a12 commit f6351a3Copy full SHA for f6351a3
algoliasearch/search/client.py
@@ -596,6 +596,19 @@ async def _copy() -> UpdatedAtResponse:
596
move_operation_response=move_operation_response,
597
)
598
599
+ async def index_exists(self, index_name: str) -> bool:
600
+ """
601
+ Helper: Checks if the given `index_name` exists.
602
603
+ try:
604
+ await self.get_settings(index_name)
605
+ except Exception as e:
606
+ if isinstance(e, RequestException) and e.status_code == 404:
607
+ return False
608
+ raise e
609
+
610
+ return True
611
612
async def add_api_key_with_http_info(
613
self,
614
api_key: ApiKey,
0 commit comments