How to use nested categories in Product Listing se...
# community-help
s
How to use nested categories in Product Listing search, filter, sort. I have multi-level category with parent children relation. I am using Laravel Scout with Typesense 26.0 without any javascript library. Rather using Livewire. But my challenge is how to go about nested categories. What I am doing is defining a new field as 'category_path' which is a string[] and then keeping category slugs from root to leaf category in the array. Further in typesense collection, I have defined this 'category_path' field as string[] and facet:true . May search result is providing facet value and facet count. But I wanted to have my sidebar with a facet value list in such a way that I should be able to click and get child facet in hierarchy. Currently I get facet_counts which is giving me array of facet values flat in decreasing order of the list count in each facet. What should be right approach for nested facets. I am not using any javascript search or menu widget. Please help. Below is my code snippet for search.