Forum Academy Marketplace Showcase Pricing Features

[New Plugin] Quick Find Search & Facet Filtering

Hello @ed727,

Excellent question! I will try to answer your question to the best of my knowledge on how the Bubble :filtered operation works and only focus on the Text type operators. I will also explain how this Plugin addresses serval limitations from the :filtered operation. Here is a demo page demonstrating the Limitations and Speed differences

Indeed, to search a string in Bubble you can always use the A- … contains or the B- … contains keyword(s).

A- … contains:

  • Useful for returning exact matches for partial words (e.g., 'A', 'pl', 'Appl', etc will return 'Apple')

:x:Limitation of A- … contains (Quick Find Plugin doesn’t have this limitation):

  1. Case sensitive ('Apple' won’t return 'apple');

B- … contains keyword(s):

  • Useful for returning non case sensitive words and/or partial phrases;

:x:Limitations of B- … contains keyword(s) (Quick Find Plugin doesn’t have these limitations):

  1. Can’t be used on Data source of type Text (Text type Data sources can’t have … contains keyword(s) operators, but only Constraint: … contains);
    Limitation4

  2. Can’t be used in Advanced: filter (Advanced: filters can’t have … contains keyword(s) operators, but only Constraint: … contains);

  3. Can’t use as a disjunction (i.e., "OR") on Data sources with multiple fields (Because this operator isn’t available in an Advanced filter you can’t use "OR" to indicate field_1 "OR" field_2 contains the value of an input);
    Limitation Limitation2

  4. Can’t use with partial words ('pple' won’t return 'apple');

:x:Joint limitations of A & B (Quick Find Plugin doesn’t have these limitations):

  1. No misspelling accepted ('aple' won’t return 'apple');

  2. No scoring to prioritize the order of the matched search list (Searched results will appear from the Data source order, not from the relevance of the search, so searching 'ship' could return ['Tommy hates spaceships', 'Lucy should worship you', 'Ships are great'] instead of ['Ships are great', 'Lucy should worship you', 'Tommy hates spaceships']);

  3. No two way searching ('mertens finn' won’t return 'Finn Mertens') (Note: here there is a little fluke as the … contains keywords(s) operator will return 'Finn Mertens' with 'mertens finn', but not with 'mertens ', 'mertens f', 'mertens fin', etc. So as the user is typing, the result will disappear as soon as a space is added 'mertens ' and won’t be returned until 'mertens' or 'mertens finn' is type;

  4. No highlighting of matched value(s);

In terms of performance/speed:
Here is an example of searching 'ship' on a list of 48k phrases with the Quick Find Plugin compared to a :filtered … contains. As you can see there is a noticeable latency before the :filtered search results are found (Approx. 5 secs).
Speed_Search

From my understanding of the Bubble code, this is what makes the Quick Find Plugin more efficient in searching client-side:

  1. Searched objects are very light;
  2. When Bubble executes the :filtered function it reconstructs “their search” function with the defined operators even if they don’t change which must have an impact on the time to execute the code operations, whereas the Quick Find Plugin preps the Data and the search parameters.
  3. When using advanced filters you might need multiple conditionals to achieve a disjunction search on multiple fields, whereas the Quick Find Plugin searches all the fields as a custom array. The way I understand how the :filtered objects are constructed is that each "OR" is a nested operator object, so when searching on lists with a lot of conditionals you will have something like this {operator_object1{operator_object2{operator_object N}}}. Since looping through arrays is faster, in most instances, than looping through object keys, if you plan on having multiple fields and large lists it will definitely add up and impact performance.

The major gains of using this Plugin are:

  1. To show search results with little to no Search latency;
  2. To search multiple fields without using multiple conditionals and/or additional text operators (e.g., :lowercase, :extract with Regex, :find/replace, etc.);
  3. To get results when the correct spelling is not known or mistyped by the user (e.g., ‘aple’ will return ‘Apple’ and ‘fin merten’ will return ‘Finn Mertens’;
  4. To highlight the matched parts of a search;

Hope this answered your question :sweat_smile: and feel free to reach out if you have other questions,

Fabrice

1 Like

Update 1.1.2

Patch fix for better handling Highlight color selection and improve the performance when the Data source has values as undefined.

Refresh your editor and Upgrade the Plugin to get updated code

1 Like

Hello @agoo7714,

I’m responding here for others using this Plugin to see.

Thank you for taking the time to review the Plugin and giving your insights. The shown scenario is expected behavior as hbar in Hedera (hbar) is further in the searched field than the other results HbarPad and (hbarp), so in this scenario Hedera (hbar) would probably be the 3rd, 4th or a later result returned.

However, I understand this isn’t the desired behavior for these scenarios and I will prioritize the exact matching feature integration which was in my scope. I have a few questions though:

  1. Does the search of the symbols have to be case-sensitive? (e.g., DOT wouldn’t return Polkadot only fields with DOT);
  2. For exact matching do you want to Allow typo? (e.g., BTJ wouldn’t return BTC only fields with BTJ);

Cheers and happy holidays,
Fabrice

Thanks for the response @fabrice.latour04 ,

The symbol search does not have to be case sensitive, e.g. DOT and dot would both return Polkadot. And yes I have the allow typo feature selected on the current app. I guess essentially I am looking to simultaneously search both the symbol and the coin name and pull the closest matches.

Happy New Year :partying_face:

1 Like

Hey @fabrice.latour04 ,

Looks good man! But what´s the difference between this plugin and the Fuzzy search and autocomplete?

Thanks a lot.

Hi @ryanck,

Great question. Here is a brief list of the Fuzzy search and autocomplete Plugin limitations that the this Plugin (Quick find search Plugin) doesn’t have:

  • Can’t search a Data type of type Text or Number, (e.g., searching option sets as a list of text or using something like Search for Users:each item's name won’t work);
  • Can’t search fields of type date, geographic address, number, or yes/no;
  • Can’t search nested fields or fields as an Option set;

Performance-wise there are numerous differences:

  • The Fuzzy search is known to crash when trying to search Data types with thousands of records (app crashing);
  • The Fuzzy search is known to have difficulties searching Data from an external API Call;

This Plugin was designed to handle tens of thousands of records (see this example where we search 58k records);

Bonus:

  • Get the highlighted matched results back (e.g., searching car will return carrot);
  • Search special characters and different languages (e.g., Ë, 就);
  • Show results on empty (i.e., will return all the search results when the input field is empty);
  • Prioritize a field for better ranking (e.g., field2 = Cities and you prioritize results with field2 as Mexico city, searching all-inclusive will return this order: Mexico city all-inclusive, Cancun all-inclusive, Tijuana all-inclusive, etc.);

Feel free to reach out if you have other questions.

Happy new year :partying_face:,
Fabrice

2 Likes

Hello @fabrice.latour04

I’m basically using the fuzzy plug-in to retrieve all the information of the company in real time by the VATID on the database.

I see a loading on page load in your demo. So my question is if your plug-in works with the database server or if it downloads all the database to the users browser because I need to work on server due to privacy.

Looking forward to your reply.

Thanks a ton.

Hello @ryanck,

In regards to Privacy rules, just like the Fuzzy Plugin, this Plugin respects all Privacy rules that you define in the Data/Privacy tab.

All the required Data is downloaded client-side from the database server, because Privacy rules are applied server-side the client user will only see what they are authorized to see from those rules.

So in an instance where a user needs to be connected to search the database, a none connected user won’t be able to search because the server won’t return anything.

Hope this helps and feel free to ask more questions,
Fabrice

2 Likes

Hello @fabrice.latour04

Thanks a lot for your reply!

Hello @fabrice.latour04

Great plugin you have here. I am really interested in it but wanted to find if it would solve my problem before i purchase it.

Currently I am running into problems with Fuzzy Search because I have a search box on the home page and another on the search results page. Fuzzy does not perform a search when the input box on search results page is prepopulated because for some odd reason it requires you to type in the input field before it shows the results.

Would Quick Find suffer from the same problems or is it able to perform and show search results even if the input box is prepopulated on page load?

Regards

@fabrice.latour04 Just purchased today and like the features but I think the search results are not operating the way I would assume it would be. If you search “national park” on your demo page main page it is just showing one result when it should show all the results matching national park. I think you’ll see what I mean when you type in “national Park” and then just type “national” you’ll see other results that should be matching “national Park”

Update 1.1.3 :partying_face:

  1. Patch fix for Two way searching didn’t always return all results.
  2. Added the Exact match setting which will prioritize exact matches over searched matches (e.g., with this setting enabled, searching corn will prioritize Tommy loves to eat corn over cornucopia).
    3

Refresh your editor and Upgrade the Plugin to get updated code

1 Like

Hey @agoo7714, enabling the new Exact match setting should fix the problem of not prioritizing Hedera (hbar) over HbarPad (hbarp).



You can test on a list of Crypto coins here and feel free to contact me if you have more requests/questions/issues.


Hello @bubble.pro, yes this Plugin is will detect Initial content and complete a search with the input value on page load if it isn’t empty. I’ve set up an example here for you to test :smiley: .

Feel free to reach out if you have any other questions.


Hello @chris19, thank you for pointing this out :pray:. This issue was coming from the Two Way searching setting which was only returning the best result instead of returning all the results. Update 1.1.3 addresses this issue and you can validate in the Demo app.

Please let me know if you encounter any other problems and feel free to reach out if you have any questions.

1 Like

Hey @fabrice.latour04, you’re a legend. Working nicely now :slight_smile:

2 Likes

I’m sold! Looking forward to using your fantastic plugin.

2 Likes

Feel free to reach out if you have any other questions :smiley: .

1 Like

Hey, @fabrice.latour04,

By this you mean that I can search for an option set?

How can I achieve this?

Thanks in advance :slightly_smiling_face: :computer:

Hello @hacker,

There are multiple ways of using Option sets within an app, but these are two of the most encountered ways of using the Plugin to search them.

  1. Search directly a list of Option sets with multiple attributes (You are not limited to the text field unlike other Plugins so you can search option sets with numbers, addresses, dates and even with attributes as other option sets :tada:)
    See an example here

  2. Search Data types that contain Option sets as a Field Type

  • Data type

And then in the Plugin settings under Nested Fields, you select the Option set Attribute Field you wish to search (e.g., Display).
3
See the QuickFind_Main example here.


In regards to highlighting the parts of the matched fields, this is a default setting.
Highligh3

You can then customize how the highlighting will appear with the Highlight options (currently you can edit the type and the color)
Highlight

The search will automatically output the Matched Fields and highlight the parts matching.
Note: When the Data source is simply a list of text because there aren’t any Fields to search the output Main data will contain the highlighting.


See an example here.

Feel free to reach out if you have other questions.
Fabrice

Thanks, @fabrice.latour04, perfect for my use case.

Two more questions:

  1. Can I search multiple text fields from the same Data Type?

  2. Does the plugin has a Threshold option?
    Captura de Pantalla 2022-01-09 a la(s) 11.18.34

The ZQ Fuzzy Search & Autocomplete have these 2 features.

Hello @hacker,

  1. Yes this Plugin currently allows 3 Text Fields + 2 Advanced Fields (can be Text, Number, Date, Address or Boolean) + 3 Nested Fields. The quantity could be adjusted in the future if needed.

  2. Yes currently the Search threshold which controls the quality of the matched results returned offers 4 options (none, low, medium, and strict). As for the previous setting, more options could be added in the future or even a user-provided value if this becomes desired.
    5

2 Likes