chore: format
This commit is contained in:
1 parent
3d50d5ff77
commit
a1d09eae95
66 files changed
+964
-211
No files matched your search
@@ -116,19 +116,18 @@ class S3VectorClient(VectorDBBase):
|
||||
return filtered_metadata
|
||||
|
||||
def has_collection(self, collection_name: str) -> bool:
|
||||
"""
|
||||
Check if a vector index exists using direct lookup.
|
||||
This avoids pagination issues with list_indexes() and is significantly faster.
|
||||
"""
|
||||
try:
|
||||
self.client.get_index(
|
||||
vectorBucketName=self.bucket_name,
|
||||
indexName=collection_name
|
||||
)
|
||||
return True
|
||||
except Exception as e:
|
||||
log.error(f"Error checking if index '{collection_name}' exists: {e}")
|
||||
return False
|
||||
"""
|
||||
Check if a vector index exists using direct lookup.
|
||||
This avoids pagination issues with list_indexes() and is significantly faster.
|
||||
"""
|
||||
try:
|
||||
self.client.get_index(
|
||||
vectorBucketName=self.bucket_name, indexName=collection_name
|
||||
)
|
||||
return True
|
||||
except Exception as e:
|
||||
log.error(f"Error checking if index '{collection_name}' exists: {e}")
|
||||
return False
|
||||
|
||||
def delete_collection(self, collection_name: str) -> None:
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user