Help with categories

Hello,
I’ve created two indexes one for products and another for recursive categories.
-My actual data structure:
My products have an attribute that points to which category it belongs to (unique cat id), and my categories each have an attribute that points to its parent category or null if it’s a top level category.
Right now i’m using Laravel with laravel scout to import my models and data and using instantsearch.js V3
Is it possible to link my product category_id in products index to my categories? So when a user searches for fruits it’ll retrieve all products with category = fruits or any of fruits children (if it has)
If not possible i guess i’d have to download all my data and modify to change category_id for something like
“fruits > citrus”
“fruits > tropical”

Thank you and sorry for my poor english.

1 Like

Hi there, I believe what you might want to achieve is the hierarchicalMenu? hierarchicalMenu | InstantSearch.js | Algolia

Otherwise, there’s no way to do joins on Algolia like on a regular database. Algolia is a search engine and in such has no concept of relations between indices.