Hi everyone, I am trying to get numerical faceting...
# community-help
v
Hi everyone, I am trying to get numerical faceting working, but it doesn't seem to work with group_by added. All facets come as zero when group_by is added. Sample response with group by
Copy code
"facet_counts": [
        {
            "counts": [
                {
                    "count": 0,
                    "highlighted": "",
                    "value": "good"
                },
                {
                    "count": 0,
                    "highlighted": "",
                    "value": "great"
                },
                {
                    "count": 0,
                    "highlighted": "",
                    "value": "average"
                }
            ],
            "field_name": "discountPercentage",
            "sampled": false,
            "stats": {
                "avg": 67.72263095600817,
                "max": 88.87149810791016,
                "min": 10.326700210571289,
                "sum": 3163188.6466932297,
                "total_values": 3
            }
        }
    ]
response without group by:
Copy code
"facet_counts": [
        {
            "counts": [
                {
                    "count": 26168,
                    "highlighted": "",
                    "value": "good"
                },
                {
                    "count": 20511,
                    "highlighted": "",
                    "value": "great"
                },
                {
                    "count": 29,
                    "highlighted": "",
                    "value": "average"
                }
            ],
            "field_name": "discountPercentage",
            "sampled": false,
            "stats": {
                "avg": 67.72263095600817,
                "max": 88.87149810791016,
                "min": 10.326700210571289,
                "sum": 3163188.6466932297,
                "total_values": 3
            }
        }
    ]
the facet_by query is
discountPercentage(average:[0,30],good:[30,70],great:[70,100])
and group_by is a simple
productSlug
. Am I missing something? Any help is very appreciated. Typesense cloud is at the latest version so all features should be there. TIA!