Hey all, title says it all, was wondering if I can use Algolio with option sets instead of data types.
Yes, give it a test
Two different ways to answer this.
- In the most general setup, yes - you can index Algolia with whatever text you want (in this case your option sets) and then search them with a custom API connector (or even a plugin).
- Using Bubble’s native Algolia integration - no, you cannot search option sets easily with their setup. Nor can you filter by option set (if I recall correctly).
I created this plugin for making it really easy to use Algolia with Bubble apps - with it you can filter searches of your custom datatypes by option sets but you can’t actually search option sets themselves. I never added that capability because, I figured, if one has so many option sets that they need Algolia to search them, then they’re probably using Option Sets wrong. But perhaps I’m wrong.
So the question is, why not make all of those options “Bubble things” instead?
Imagine you have something analogous to “US States” but with the full words, not the 2-letter character code. I want the search to be fuzzy/smart/fast. Isn’t this ideal for Algolia? You wouldn’t want to put these in a Thing right, they’re better suited for an option set.
Agreed, you wouldn’t want these as things. Algolia, as mentioned before, can totally handle this… but it’s pretty overpowered for what you’re trying to do (it’s really built to make thousands/millions of records searchable/filterable). Instead, I’d recommend uploading these as a static json file to your bubble app. Then, initialize a bubble api connector connection to that static json file. Then, feed the results of that to the fuzzy search element (from an api call to your json file)… I’m not 100% sure the fuzzy search plugin can support this - if it can, great! Otherwise, the underlying Javascript library used in the FuzzySearch plugin can be rigged to search this for you (you could fork the plugin and customize it to work for this use case). I’m thinking this is the best way to solve this:
- simpler than messing with Algolia
- doesn’t cost you $$ since you’re not using Algolia or WUs (everything get search client side)
- since you’re not trying to load this as an option set, you don’t get the page load speed penalty of loading it for every page (you can just load it on the one page/place you need it when you need it).
Thanks for taking the time to write this out, I’ll look into that.