def test_number_facet(self):
        """Test getting numeric facet with metrics"""
        res = self.client.index(self.unstructured_text_index_name).search(
            "shirt",
            search_method="HYBRID",
            facets={"fields": {"price": {"type": "number"}}}
        )
        self.assertIn("facets", res)
        self.assertIn("price", res["facets"])
        for metric in ["min", "max", "avg", "count", "sum"]:
            self.assertIn(metric, res["facets"]["price"])
Test getting numeric facet with metrics
tests/api_tests/v1/tests/api_tests/unstructured_index/test_facets.py