In this episode, we're setting up our product data so we can support filtering—think of those side filters in online stores for color, size, etc. We start by talking about faceted search, which is a way to organize and index product properties (like color and size) so users can filter them smoothly.
We dive into our current product model and work through grouping variations (like different sizes and colors) by their type. Then, we map and format this data into a new structure that gets pushed into our MeliSearch index. Along the way, we troubleshoot some small bugs (watch out for typos in your function names!) and make sure the data lands in the right shape.
Next, we add more product variations—like a wild "rainbow" color to a shoe—and show how to associate the new options with different products. Once everything is updated and re-indexed, we can see our products now support filtering by these attributes in MeliSearch.
By the end of this episode, we have all the necessary color and size options indexed by product, ready to be used for filtering. In the next episode, we’ll work on actually displaying these filter options in the UI so users can start filtering for what they want!