def test_no_model_in_add_documents_error(self):
        """Test to ensure that adding documents to an index with no model raises an error for the
        specific documents."""
        documents = [
            {
                "_id": "1",
                "text_field_1": "text",
            },
            {
                "_id": "2",
                "custom_field_1":
                    {
                        "content": "test custom field content",
                        "vector": [1.0 for _ in range(self.DIMENSION)]
                    }
            }
        ]

        for index_name in [self.structured_index_with_no_model, self.unstructured_index_with_no_model]:
            with (self.subTest(index_name=index_name)):
                tensor_fields = ["text_field_1", "custom_field_1"] if \
                    index_name == self.unstructured_index_with_no_model else None
                mappings = {"custom_field_1": {"type": "custom_vector"}} if \
                    index_name == self.unstructured_index_with_no_model else None
                r = self.add_documents(
                    config=self.config,
                    add_docs_params=AddDocsParams(
                        index_name=index_name,
                        docs=documents,
                        tensor_fields=tensor_fields,
                        mappings=mappings)
                ).dict(exclude_none=True, by_alias=True)
                self.assertEqual(r["errors"], True)
                self.assertIn("Cannot vectorise anything with 'no_model'", r["items"][0]["error"])
                self.assertEqual(400, r["items"][0]["status"])
                self.assertEqual("inference_error", r["items"][0]["code"])
                self.assertEqual("1", r["items"][0]["_id"])

                self.assertEqual("2", r["items"][1]["_id"])
                self.assertEqual(200, r["items"][1]["status"])
                self.assertEqual(1, self.monitoring.get_index_stats_by_name(index_name).number_of_documents)
                self.assertEqual(1, self.monitoring.get_index_stats_by_name(index_name).number_of_vectors)
Test to ensure that adding documents to an index with no model raises an error for the
        specific documents.
tests/integ_tests/tensor_search/integ_tests/test_no_model.py