def test_invalid_facet_parameters_fail(self):
        """Test that invalid facet parameters raise errors"""
        invalid_params = ["fields.to_", "fields.from_", "max_results", "max_depth", "fields.max_results"]
        for param in invalid_params:
            with self.assertRaises(MarqoWebError) as e:
                facets = {"fields": {"color": {"type": "string"}}}
                if param.startswith("fields."):
                    facets["fields"]["color"][param[6:]] = 100
                else:
                    facets[param] = 100
                self.client.index(self.unstructured_text_index_name).search(
                    "shirt",
                    search_method="HYBRID",
                    facets=facets
                )
            self.assertIn("extra fields not permitted", str(e.exception).lower())
Test that invalid facet parameters raise errors
tests/api_tests/v1/tests/api_tests/unstructured_index/test_facets.py