We faced a problem when we were developing the search part of our E-Commerce website with dynamic filters using facet filters. Our website is based on Laravel and we are using Laravel/Scout library to connect with algolia.
We are getting the list of our facet filters by sending [“facets”:"*"] as a parameter.
For example, we have a filter for brands. When a user filters a brand (Ex: [“brands: Samsung”]), The facets[“brands”] result just contains that particular brand not all available brands. But we want the customer to be able to select another brand after he/she selected one brand.
We have found a way to do that. and it’s sending separated requests. One including a brands filter and one another without filtering brands to get the list of all available brands. But we know it isn’t the right way to do that. because when the list of our filters increases, we have to get a separated request without that filter and it could affect the performance and Increase the count of our requests and its cost. Is there any way to do that?