def test_filter_exclusions_without_filter_fails(self):
        """Test that exclude terms require a filter string"""
        with self.assertRaises(MarqoWebError) as e:
            self.client.index(self.unstructured_text_index_name).search(
                "shirt",
                search_method="HYBRID",
                facets={
                    "fields": {
                        "color": {
                            "type": "string",
                            "excludeTerms": ["nonexistent:value"]
                        }
                    }
                }
            )
        self.assertIn("Exclude terms can only be used when a filter string is provided", str(e.exception))
Test that exclude terms require a filter string
tests/api_tests/v1/tests/api_tests/unstructured_index/test_facets.py