I’m trying to filter an RG of products by multiple filters (see image). A user may choose to see all seats that have any of the option sets checked: Benches, Lounge chairs, Bar & Counter stools, etc.
It seems like there is no super easy way to do this but I’ve seen three different methods, all have their pro/cons and was wondering if anyone had any insights into which was best.
URL Parameters (How to set Parameter as a List).
Essentially adding each new filter to the URL, which the RG references to to filter the results.
Pros: Can be shared, seems to be fairly scalable (faster response times for large RGs)
Cons: Complex to set up, some what hacky
Advanced filtering (https://www.youtube.com/watch?v=7jNUmzIyFg0)
Loading the RG and filtering
Pros: Easier to set up
Cons: Not scalable since it is client side
Daisy Chaining (Loom | Free Screen & Video Recording Software | Loom)
Setting up a series of workflows that cascade through the chosen filters
Pros: Scalable for large RGs
Cons: Seems like a super-hack (which scares me).
I’m leaning towards option 1 due to the share-ability but open to any / all suggestions.
I’m obviously partial to #1
Complex part may be avoided by not using the Advanced filter from Bubble (only necessary when comparing a list to a list: so a list of selected filters compared to a list field on the data type searched), otherwise it is no more complicated than setting up a search referencing any other value to hold the selected filters (custom state or URL parameter essentially same concept except the URL parameter allows for so much better UX and possible feature sets)
In terms of it being ‘hacky’ it is not. If you look at any major site they all use either URL parameters or URL path lists to store the filters of your searches. Example from Amazon after selecting two filters
If the largest online retailer in the world uses it, it must be a solid approach. Just be aware of the need for canaconical URLs if you are going to display the product page with the URL parameters still there as a user may be able to find the same product page from different filter choices resulting in different URLs pointing to the same product page and therefore without use of canaconical URL could be construed as ‘duplicate content’ (only necessary if you are trying to maximize your SEO)
In regards to #2, this use of Advanced filter is as mentioned earlier only needed if comparing a list to a list. I recently avoided this and sped up my search dramatically by putting the different filter values onto the data type itself in the form of a text field. What I had was 7 different filters, all different option sets. I put onto the data type to be searched a text field that stored the values of the different related filters as a text, then manipulated it in the search constraints to extract the values (I’m simplifying the concept and not going into exact details of the approach as I don’t have the app I did it in open)…this approach of the text field made it so things were much quicker, but did require functions to capture the list of texts properly from the user inputting the data. In the end, I still made use of the URL parameters to allow the different functions and features possible for searches that use URL parameters.
In terms of #3, I personally would not use it. I saw a video about it maybe 6 months ago and was taken back by the approach as it seems overly complex, likely slower than needs to be in returning results, uses capacity to run workflows and again just way too complex to manage in any reasonable fashion.
Hey @boston85719 - you are correct, the URL parameters is actually the pro way to do it.
However, the more the look into this, it seems clear I need to use Algolia for performance.
There is another option called ‘Typesense’ that I’ve seen discussed in the forum the last couple of days…benefits of it seem to be cheaper than Agolia.
You could also look into a plugin that I believe is ‘multifaceted’ search. I’ve used it in client applications and it is helpful, but most helpful for single page apps as I believe the data was needed before the plugin can really do it’s magic.