+1 for this. Love the plugin! Would be great to be able to search fields that are other data types.
@cschrade @romanmg Hmm, yeah, that would be good, but the Bubble plugin editor only lets us expose fields of the generic types, not other data types. Might be possible to combine several Data Source searches together, but it’d get messy… I’ll have a think on it
Love the plugin and it works great for me most of the time! Only issue I’m having is when I am trying to pull search criteria from another page by sending the query information via the URL.
For example, if I want to search for “cat” on another page, it will redirect me to the search page and send “cat” in the URL. Then, my search input box is set to pull its initial content from the URL so the search input box will say “cat”. The Search&Autocorrect has it’s Input Box ID set to the search input box’s ID Attribute. However, when the search page loads with “cat” displayed in the search input box, the Search&Autocorrect returns no matches for cat when it should show two matches. If I clear the search input box and manually type in “cat”, then the Search&Autocorrect works again.
Not sure what is causing this or if anyone else has experienced this, but any help would be greatly appreciated!
@dambusmedia Awesome plugin, really powerful addition! One challenge I’m running into is that if I turn on the “Tokenize” option to have the search match each word in my string, single-letter words like “a” and “I” match to any record that has the letter in them. So if I typed “A great sandwich”, it would find “Airbnb”, “Mario”, and “Grandma” because they all have the letter “a” in them. Any thoughts on how we could tweak this to either (a) require a minimum number of characters to match or (b) exclude certain strings?
@kbgreenway, Sorry, I started a response a while ago but apparently forgot to press Reply Yeah, that’ll be a bug. If you’re using the option for fast updates from an Input box by putting in it’s ID, the search function only runs when the input box content changes, so the initial content set by Bubble doesn’t kick it off. I’ve added the bug to my todo list: https://github.com/nocodeco/Bubble-Plugin-Search-Autocorrect/issues/3
If you’re using the “Text to Match” option and pointing to an input box’s value, it should work fine with initial content.
@ahaller Thanks, that’s a good spot, hadn’t noticed that. Unfortunately the library used for the fuzzy searching doesn’t support option a). Option b) is pretty easy to do if you’re using the “Text to Match” field, just do a find & replace on your input value and use a Regex that strips out single character words, like:
(^| ).( |$)
I’ll need to update the plugin to allow the same if you’re using the “Set text to match from an input box” option. Will try to get around to it as soon as possible, unfortunately haven’t had much time to work on my plugins lately. https://github.com/nocodeco/Bubble-Plugin-Search-Autocorrect/issues/4
Thanks @dambusmedia! That fix would be perfect since the real-time connection to an input box is the feature I’m loving most. Keep us posted and thanks for the great support!
Hi @ahaller, I’ve pushed an update that adds an “Exclude search terms under x characters” option. Hope that does the trick.
Also fixes an issue where search term ending in a trailing space would return no results when “Tokenize” and “Match all tokens” were enabled.
Do you have any tips for resetting the search results? Putting all the elements into a group and resetting the group doesn’t reset the results that appear in the repeating group that is using the “Search & Autocorrect” element.
I can manually backspace and cause the results to go away, but haven’t found any other way to clear the them.
@dserber I agree. Would be interested as to how we can “trigger” a new search. For example, when the input is reset (i.e. repeating group should be blank), or if the input is the same but the user “filters” the search by clicking a button (e.g. by location, or by cost, etc).
In the case of resetting an input @dserber, you can set a condition that the repeating group is only visible when the input is not empty (i.e. resetting the input will cause the repeating group to disappear). But this only works if it makes sense for the repeating group to disappear of course! I’m sure there are cases where you may want the repeating group formatting to remain on the page!
You’re right, I need to add a reset function. Will do so in next update.
Have pushed an update with a reset input function, that will clear the results and reset an input box when you’re using the fast updates feature. Let me know if you find any issues with it
Thanks for adding the reset feature! How can I trigger it? I’ve tried putting the input, search element, repeating group, and “reset” icon into the same group and resetting the group with a workflow but it’s not working.
Is it possible that the plugin stopped working? I have no results but didn’t change a thing…
@dserber, I couldn’t manage to get it working with the default reset action, so I added a new action to the plugin itself. You’ll need to Element Actions -> Reset an input Search & Autocorrect
@eddy, Seems to still be working fine. Did you upgrade the plugin version and things stopped working?
Nope didn’t upgrade anything
I found it. Thanks! I thought it was something simple I was overlooking.
Has anyone run into a problem when using this plugin within a popup? I can get it to trigger a repeating group just fine on a page, but put the same elements inside a popup and it does not work.
Does this not work within native groups?
Got it, I did not realize it was to be followed in letter and spirit.
This works great…
First, thank you for this plugin
And I have a problem. Everything works in test mode, but not in Live.
My data was correct, I checked a thousand times. I even created an RG, showed the path in SearchBox Autocorrect, and all the data appears.
Input Box Ids are correct. Thresold is 0.6
Do you have any solutions?