From d728dd9d3f24b1a0cec7c5215e6506c2ea1d00da Mon Sep 17 00:00:00 2001 From: Marcin Antas Date: Mon, 23 Mar 2026 14:47:43 +0100 Subject: [PATCH 1/2] feat: add support for alter schema drop vector index --- weaviate/collections/config/async_.pyi | 1 + weaviate/collections/config/executor.py | 38 +++++++++++++++++++++++++ weaviate/collections/config/sync.pyi | 1 + 3 files changed, 40 insertions(+) diff --git a/weaviate/collections/config/async_.pyi b/weaviate/collections/config/async_.pyi index 015b70dab..91139dd83 100644 --- a/weaviate/collections/config/async_.pyi +++ b/weaviate/collections/config/async_.pyi @@ -90,3 +90,4 @@ class _ConfigCollectionAsync(_ConfigCollectionExecutor[ConnectionAsync]): self, *, vector_config: Union[_VectorConfigCreate, List[_VectorConfigCreate]] ) -> None: ... async def delete_property_index(self, property_name: str, index_name: IndexName) -> bool: ... + async def delete_vector_index(self, vector_name: str) -> bool: ... diff --git a/weaviate/collections/config/executor.py b/weaviate/collections/config/executor.py index c95cba5a3..148174171 100644 --- a/weaviate/collections/config/executor.py +++ b/weaviate/collections/config/executor.py @@ -631,3 +631,41 @@ def resp(res: Response) -> bool: error_msg="Property may not exist", status_codes=_ExpectedStatusCodes(ok_in=[200], error="property exists"), ) + + def delete_vector_index( + self, + vector_name: str, + ) -> executor.Result[bool]: + """Delete a vector index from the collection in Weaviate. + + This is a destructive operation. The index will + need to be regenerated if you wish to use it again. + + Args: + vector_name: The name of the vector whose index to delete. + + Raises: + weaviate.exceptions.WeaviateConnectionError: If the network connection to Weaviate fails. + weaviate.exceptions.UnexpectedStatusCodeError: If Weaviate reports a non-OK status. + weaviate.exceptions.WeaviateInvalidInputError: If the vector does not exist. + """ + _validate_input( + [_ValidateArgument(expected=[str], name="vector_name", value=vector_name)] + ) + + path = ( + f"/schema/{_capitalize_first_letter(self._name)}" + + f"/vectors/{vector_name}" + + "/index" + ) + + def resp(res: Response) -> bool: + return res.status_code == 200 + + return executor.execute( + response_callback=resp, + method=self._connection.delete, + path=path, + error_msg="Vector may not exist", + status_codes=_ExpectedStatusCodes(ok_in=[200], error="vector exists"), + ) diff --git a/weaviate/collections/config/sync.pyi b/weaviate/collections/config/sync.pyi index e54d8c8fc..7bd450819 100644 --- a/weaviate/collections/config/sync.pyi +++ b/weaviate/collections/config/sync.pyi @@ -88,3 +88,4 @@ class _ConfigCollection(_ConfigCollectionExecutor[ConnectionSync]): self, *, vector_config: Union[_VectorConfigCreate, List[_VectorConfigCreate]] ) -> None: ... def delete_property_index(self, property_name: str, index_name: IndexName) -> bool: ... + def delete_vector_index(self, vector_name: str) -> bool: ... From 6d58d21d1a4273394380dc075e5720886c2819c1 Mon Sep 17 00:00:00 2001 From: Marcin Antas Date: Sat, 14 Mar 2026 12:03:38 +0100 Subject: [PATCH 2/2] feat: add support for blobHash property type --- test/collection/test_config.py | 8 ++++++++ weaviate/collections/classes/config.py | 2 ++ 2 files changed, 10 insertions(+) diff --git a/test/collection/test_config.py b/test/collection/test_config.py index 73c3e56ae..aa4be85e4 100644 --- a/test/collection/test_config.py +++ b/test/collection/test_config.py @@ -1335,6 +1335,10 @@ def test_config_create_with_properties( name="blob", data_type=DataType.BLOB, ), + Property( + name="blob_hash", + data_type=DataType.BLOB_HASH, + ), Property( name="phone_number", data_type=DataType.PHONE_NUMBER, @@ -1398,6 +1402,10 @@ def test_config_create_with_properties( "dataType": ["blob"], "name": "blob", }, + { + "dataType": ["blobHash"], + "name": "blob_hash", + }, { "dataType": ["phoneNumber"], "name": "phone_number", diff --git a/weaviate/collections/classes/config.py b/weaviate/collections/classes/config.py index 699a3c2a8..36a98e621 100644 --- a/weaviate/collections/classes/config.py +++ b/weaviate/collections/classes/config.py @@ -142,6 +142,7 @@ class DataType(str, BaseEnum): UUID_ARRAY: UUID array data type. GEO_COORDINATES: Geo coordinates data type. BLOB: Blob data type. + BLOB_HASH: Blob hash data type. PHONE_NUMBER: Phone number data type. OBJECT: Object data type. OBJECT_ARRAY: Object array data type. @@ -161,6 +162,7 @@ class DataType(str, BaseEnum): UUID_ARRAY = "uuid[]" GEO_COORDINATES = "geoCoordinates" BLOB = "blob" + BLOB_HASH = "blobHash" PHONE_NUMBER = "phoneNumber" OBJECT = "object" OBJECT_ARRAY = "object[]"