def test_to_vespa_document_invalidDataType_fails(self):
        """
        Test that an error is raised when a field has an invalid data type e.g., a string for a float field.
        """
        invalid_data_type_docs = [
            ("int when it should be text", {
                '_id': 'my_id',
                'title': 'my title',
                'description': 12345,   
            }),
            ("array of text when it should be text", {
                '_id': 'my_id',
                'title': 'my title',
                'description': ['my description', 'hello'],   
            }),
            ("float when it should be int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': 123.45,   
            }),
            ("array of int when it should be int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': [123, 456],   
            }),
            ("bool when it should be int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': True,   
            }),
            ("array of bool when it should be int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': [True, False],   
            }),
            ("float when it should be bool", {
                '_id': 'my_id',
                'title': 'my title',
                'description': 123.45,   
            }),
            ("array of float when it should be bool", {
                '_id': 'my_id',
                'title': 'my title',
                'description': [123.45, 678.90],   
            }),
            ("text when it should be array of text", {
                '_id': 'my_id',
                'title': 'my title',
                'tags': 'fail',   
            }),
            ("int when it should be array of int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': 123,   
            }),
            ("bool when it should be array of bool", {
                '_id': 'my_id',
                'title': 'my title',
                'description': True,   
            }),
            ("float when it should be array of float", {
                '_id': 'my_id',
                'title': 'my title',
                'description': 123.45,   
            }),
            ("array of float when it should be array of int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': [123.45, 678.90],   
            }),
            ("array of bool when it should be array of int", {
                '_id': 'my_id',
                'title': 'my title',
                'description': [True, False],   
            }),
        ]
            
        for case_desc, marqo_doc in invalid_data_type_docs:
            with self.subTest(case_desc):
                with self.assertRaises(core_exceptions.InvalidDataTypeError):
                    self.vespa_index.to_vespa_document(marqo_doc)

        Test that an error is raised when a field has an invalid data type e.g., a string for a float field.
        
tests/integ_tests/core/structured_vespa_index/test_structured_vespa_index.py