typesense / typesense-instantsearch-adapter

A JS adapter library to build rich search interfaces with Typesense and InstantSearch.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to add stats for FACET results?

fedex1 opened this issue · comments

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
**: