def test_recommender_structuredDocumentsNoTensorFields(self):
        """Test to ensure that an error is raised when invalid tensor fields are provided for a structured index"""
        docs = [
            {
                "_id": "1",
                "title": "Red orchid",
                "tags": ["flower", "orchid"],
            },
            {
                "_id": "2",
                "title": "Red rose",
                "tags": ["flower"],
                "content": "test"
            },
            {
                "_id": "3",
                "title": "Europe",
                "tags": ["continent"],
            },
        ]

        index_name = self.structured_index_name
        add_docs_results = self.client.index(index_name).add_documents(docs)
        if add_docs_results["errors"]:
            raise Exception(f"Failed to add documents to index {index_name}")

        with self.assertRaises(MarqoWebError) as e:
            self.client.index(index_name).recommend(
                documents=['1', '2', '3'], tensor_fields=["void"]
            )
        self.assertIn("Available tensor fields: title, content", str(e.exception))
Test to ensure that an error is raised when invalid tensor fields are provided for a structured index
tests/api_tests/v1/tests/api_tests/test_recommend.py