typesense / typesense-instantsearch-adapter

A JS adapter library to build rich search interfaces with Typesense and InstantSearch.js
MIT License
361 stars 62 forks source link

How to add stats for FACET results? #207

Open fedex1 opened 1 month ago

fedex1 commented 1 month ago

Description

We'd like to show the sum and average etc. for the facet results. We do not see a way to do this.

Steps to reproduce

See https://typesense.org/docs/26.0/api/search.html#facet-results

It says

 For integer fields, Typesense will also return min, max, sum and average values, in addition to counts.

And it does return them but what is the correct way to display them?

Expected Behavior

An easy widget should exist or template example to show the maximum of the faceted column.

Actual Behavior

There seems to be no example of how to do this.

Metadata

{"state":1,"version":"0.25.2"}:

Distributor ID: Ubuntu Description: Ubuntu 22.04.3 LTS Release: 22.04 Codename: jammy :