Services Plugins FAQs

How to implement "No matches found" with Algolia plugin

Hi, I’m using algolia plugin in my app. I was wondering if any of you figured out how to achieve “No matches found” scenario.

Oneway is to use the condition

  1. Search box value is not empty and
  2. AlgoliaSimpleSearch Result is empty

But I’m already using this condition to display a loader to indicate that the results are loading. When no matches are found, Algolia returns with nbHits=0 but this is not available through any of the states.

Has any of you figured this out?

Thanks in advance!

1 Like

Hello @rajesh79719,

Thank you for your message.

Regarding your question, yes, you can trigger a workflow when there are no matches in Algolia. For example, you can use a “Do when condition is true” Bubble event and set the condition to “Result’s nbHits is empty”—this will trigger when the results are empty.

Could you please check this and let me know if this answers your question?

Thanks, and I look forward to your reply.

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

I tried that out Stephan. It doesn’t work. The problem that I see in the plugin is, when there are no results found, the “AlgoliaSimpleSearch A’s Result” state wouldn’t exist. So I’m unable to apply ‘Is Empty’ conditions on any of the fields. Ideally the state should exist all the time with null values (when there are no matches found) and valid values (when there are matches found)

Hello @rajesh79719,

Thank you for your message and observation.

After further checking, I also noticed that the state becomes null when there are no values, where a value of 0 would be a better and more logical solution. I have forwarded this to our dev team for further review, and it will be addressed in the next plugin update.

Thanks! If you have any other questions in the meantime, please let me know.

Best regards,
Support Team
Browse all Zeroqode Plugins for Bubble
Banner_Last3

1 Like