def test_number_facet_with_infinite_ranges(self):
        """Test number facet with infinite ranges"""
        facets = FacetsParameters(
            fields={
                "field1": FieldFacetsConfiguration(
                    type="number",
                    ranges=[
                        {"to": 0},
                        {"from": 0}
                    ]
                )
            }
        )
        result = self.index._get_facets_term(facets)
        expected = ('all( all(group(predefined(marqo__int_fields{"field1"}, bucket(-inf, 0.0), bucket(0.0, inf))) '
                   'max(100) order(-count()) each(output(sum(marqo__int_fields{"field1"}), avg(marqo__int_fields{"field1"}), '
                   'min(marqo__int_fields{"field1"}), max(marqo__int_fields{"field1"}), count()))) '
                   'all(group(predefined(marqo__float_fields{"field1"}, bucket(-inf, 0.0), bucket(0.0, inf))) '
                   'max(100) order(-count()) each(output(sum(marqo__float_fields{"field1"}), avg(marqo__float_fields{"field1"}), '
                   'min(marqo__float_fields{"field1"}), max(marqo__float_fields{"field1"}), count()))) )')
        self.assertEqual(result, expected)
Test number facet with infinite ranges
tests/unit_tests/marqo/core/unstructured_vespa_index/test_facets_term.py