def test_numeric_facet_with_ranges_returns_exact_value(self):
        """ Test that searching numeric field facet with ranges returns exact expected value """
        res = self.client.index(self.unstructured_text_index_name).search(
            "shirt",
            search_method="HYBRID",
            facets={
                "fields": {
                    "price": {
                        "type": "number",
                        "ranges": [
                            {"to": 50},
                            {"from": 50}
                        ]
                    }
                }
            }
        )

        self.assertIn("facets", res)
        self.assertIn("price", res["facets"])
        self.assertEqual(len(res["facets"]), 1)
        self.assert_dict_almost_equal(res["facets"]["price"], {
            "-Inf:50.0": {
                "min": 1.2,
                "max": 49.3,
                "avg": 32.06,
                "count": 4,
                "sum": 128.239
            },
            "50.0:Inf": {
                "min": 55.54,
                "max": 92.99,
                "avg": 79.217,
                "count": 6,
                "sum": 475.3
            }
        }, places=2)
 Test that searching numeric field facet with ranges returns exact expected value 
tests/api_tests/v1/tests/api_tests/unstructured_index/test_facets.py