Does typesense support nested facets? Similar to s...
# community-help
n
Does typesense support nested facets? Similar to something described here - https://stackoverflow.com/questions/73433506/how-to-achieve-hierarchial-filter-in-facets-in-typesense
j
If you're using vue-instantsearch as mentioned in that post, then you can use this widget: https://www.algolia.com/doc/api-reference/widgets/hierarchical-menu/vue/ And you'd need to structure the data as described in this section: https://www.algolia.com/doc/api-reference/widgets/hierarchical-menu/vue/#requirements
n
sorry, not using vue. I shared that post just to show an example of hierarchy of facets.
any way to do this with just typesense?
j
You want to generate the type of queries that are generated when you click on the filter by categories menu in this example: https://ecommerce-store.typesense.org
(have a look at the network tab in the browser dev console)
n
So if understand correctly the hierarchy is encoded in the field value itself using
>
and the frontend is then responsible to construct the facet filters accordingly, right? I guess that should work for us.
j
Correct. For filtering, you'd break each level in the hierarchy out
and filter on those fields
n
cool, thanks!
👍 1