Templates Plugins Courses

Issue using multiple filters in Algolia plugin

Hi, I’m having some issues combining multiple filters with the Algolia Plugin (V 3.29.0).

I reviewed the other thread (Need help with Algolia Filter Setup) on this but the addition of parentheses doesn’t seem to be required since I’m only using the AND operator. Do I have something incorrect with my syntax?

What I’m trying to set up:

which equates to the following when filters are chosen:

Hello, @andrewmccalister
Thanks for your message.

We also received your message on the Bubble Forum.
As it was noted, we will check with our Development team exactly what is wrong with these settings and if it is possible to add multiple settings.

Due to the fact that we have some additional questions regarding your settings, can you please add our Support Team email to the list of collaborators to your application and provide me a link to your application? This will allow us to check your settings and run some tests to fix the mentioned problem.

To add our Support Team as a collaborator, you need to do the following steps in the Bubble Editor:

Settings > Collaboration > Add email support@zeroqode.com

Note: avoid the warning message regarding the plan, as we are an agency and you can easily add us to your collaborators.

I will revert to you with an answer as soon as possible.
Best regards,

Hey @Ecaterina ,

Added the email as a Collaborator.

Link to editor: MOFO-MAVEN | Bubble Editor

1 Like

Thanks for adding our team to your app.

I will revert to you with an update once we will check your application and define the issue.
It can take some time.

Thanks for your understanding.
Best regards,

Hi @Ecaterina, thanks for your response.

When you say it may take a little time, are we talking days, weeks, longer…?



Please note that It can take a few days, no longer :slightly_smiling_face:
Thank you!

Best regards,

1 Like

Hello, @andrewmccalister

We checked your application and suppose that the issue in the filtered results was related to the Logical Operator you are using, I mean “AND”:

Please note that in case you are using “AND”, the item should correspond to every filter:

However, once we tried to use “OR”, we received the correct result within your app.

Also, do not forget to use the space ofter the set of the delimiter in the plugin’s element.

Hope it would be helpful.
Best regards,

Hi @Ecaterina, thanks for your response.

On a side note, I need the filters to be AND. For example, If someone has selected the category: ‘Seating’ and Manufacturer: ‘Memo Furniture’ I only want to see ‘Seating’ by ‘Memo Furniture’, not products that have the category ‘Seating’ OR the manufacturer ‘Memo Furniture’.

I’m still having some fundamental issues, but I think I’ve understood the core problem:

When I pass an empty parameter into the filter, it seems like the search is looking for a product where the filter is empty. For example, if I want to filter products to only see products from Memo Furniture with a Price <5,000, it works great:

But when I keep the filter parameters the same (i.e still passing ‘List Price - Min’ and ‘Manufacturer’) but change the options so I want to see products from ANY manufacturer (i.e removing the ‘Memo Furniture’ filter) with a ‘price < 5000’ it breaks since the Manufacturer Parameter is “”:

As you can see, I should be seeing more products, since I’ve removed the constraint of ‘Memo Furniture’ having to be a Manufacturer but I’m seeing no responses.

It seems like the way to solve this is for Algolia to ignore empty ("") parameters, is this possible? I’v enot seen a way to do it.

Another, FAR more hacky way is by using conditional statements to change the Filter parameter based on what filters are chosen by the user so that we are never passing the empty parameters like Manufacturer: “” to Algolia.

Is this the correct solution? My concern would be this gets unwieldy very quickly - with 4 different filters, we’d need 16 different conditional statements, 5 filters = 32 conditionals, 6 filters = 64 conditionals, and so on…

ok, for anyone interested I got to the solution.

Firstly, there were actually three things causing issues:

  1. You can’t send a filter with an empty parameter (i.e Manufacturer: “”)
  2. For Attributes with a space (’ ') in the name, you need to put the attribute name in “”. e.g an Attribute named List Price needs to be added to the Filter as “List Price”.
  3. You can’t have Boolean operators (AND) not attached to an Attribute. “Manufacturer”: “Mfr_1” AND “List Price” < 5000 will work but “Manufacturer”: “Mfr_1” AND will not work.

This all means that having dynamic filtering takes more thought.

I set it up such that an Attribute is only included in the Filter if a user has chosen to filter the RG by that Attribute (meaning it exists in a custom state and has a value) - via :format as text for a list or :find & replace for a single item. I combined that with conditionals so there was never an ‘AND’ without an associated Attribute.

1 Like

Hello, @andrewmccalister
Sorry for my long reply to you.

I’m happy that you were able to find a workaround for your specific case.
If we can help you with anything else - let me know.

Best regards,

Hello, @andrewmccalister

By this message, we would like to notify you that we have updated the plugin and added new action ’ Save Objects’.
Please update the plugin to Version: 3.31.0. and try it.

I hope you’ll find it useful for you.
Best regards,