I am using typesence to build contextual query suggestions but there is not enough documentation for its query suggestions features.
I have implemented popular query suggestions using this page from typesence but want to show query suggestions for different product categories. Something like:

Depending on your use-case and data you can either perform a multi-search (aka federated search) on your different popular queries collections or use a
group_byattribute in your query-suggestion query.In the former (federated) you will have to use the results from each collection to create your categorized suggestions.
In the latter (groupping), the results will be located in the
groupped_hitsattribute instead ofhitsindexed by the groupping attribute value.