def test_add_documents_with_custom_vector_not_in_tensor_fields(self):
        """
        Add a document with a custom vector field but not declared in tensor fields (for unstructured index only)
        should fail validation, raise a ValidationError and fail the batch
        """
        for index in [self.unstructured_custom_index, self.semi_structured_custom_index]:
            with self.subTest(msg=f'{index.name}: {index.type}'):
                with self.assertRaisesStrict(pydantic.error_wrappers.ValidationError) as err:
                    self.add_documents(
                        config=self.config, add_docs_params=AddDocsParams(
                            index_name=index.name,
                            docs=[{
                                "_id": "0",
                                "my_custom_vector": {
                                    "content": "custom content",
                                    "vector": self.random_vector_1
                                }
                            }],
                            device="cpu",
                            mappings=self.mappings,
                            tensor_fields=[]
                        )
                    )

                self.assertRegex(str(err.exception),
                                 r"Cannot create custom_vector field .* as a non-tensor field. "
                                 r"Add this field to 'tensor_fields' to fix this problem.")

        Add a document with a custom vector field but not declared in tensor fields (for unstructured index only)
        should fail validation, raise a ValidationError and fail the batch
        
tests/integ_tests/tensor_search/integ_tests/test_custom_vector_field.py