🔎 Algolia Search V2.0 - Major Plugin Update from Zeroqode

Hi @andrewmccalister,

Thanks for the details - we reviewed the filter you posted.

The most common causes of AND/grouping problems are extra escaping (backslashes/quoted attribute names) and mismatched field names/types in the Algolia index. Algolia expects attribute names without surrounding quotes, and parentheses/AND/OR are supported - so your logic is fine if sent in the correct syntax.

Please try this exact string in the plugin Filters input (don’t add extra backslashes or wrap it in JSON quotes):
Mfr_active:true AND Product_active:true AND ((Depth > 90 AND Depth < 100) OR (Width > 90 AND Width < 100))

Quick checklist:

  • Field names must match exactly (case sensitive) in your Algolia index.
  • Depth and Width must be stored as numeric attributes for comparisons.
  • Remove escaped quotes like \"Depth\" - Bubble sometimes inserts those and it breaks the parser.
  • If you prefer, numeric ranges can also be placed in numericFilters, but combining OR+AND is usually simpler with the filters string.

If that doesn’t fix it, please paste the exact string you’re sending (or a screenshot of the plugin field) and we’ll check for escaping issues or help translate it to numericFilters.

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

Thanks for your response.

  • Field names must match exactly (case sensitive) in your Algolia index. - They are matched exactly

  • Depth and Width must be stored as numeric attributes for comparisons. - They are stored as numeric

  • Remove escaped quotes like \"Depth\" - Bubble sometimes inserts those and it breaks the parser. - The escaped quotes are taken from Algolia search logs (i.e how Algolia receives the filter. You can see below how it is represented in Bubble Logs and how it’s received in the Algolia search logs:

  • If you prefer, numeric ranges can also be placed in numericFilters, but combining OR+AND is usually simpler with the filters string. For Numeric filters I presume you mean something like “Depth 90 TO 100”. From my reading I wouldn’t be able to combine and OR for Depth and Width i.e “Depth 90 to 100 OR Width 90 TO 100”?

Hi @andrewmccalister,

Thanks for the extra screenshots - they helped. From the request body you pasted it’s clear why Algolia is rejecting the call: the filter string is being sent with escaped quoted attribute names (e.g. \"Depth\") which breaks Algolia’s parser. Algolia expects unquoted attribute names / plain numeric comparisons in the filters string.

What to try now (in this order)

  1. Paste a static filter string (no dynamic expressions) into the plugin Filters field - copy this exactly and save:
Mfr_active:true AND Product_active:true AND ((Depth > 90 AND Depth < 100) OR (Width > 90 AND Width < 100))

If that works, it confirms Bubble’s dynamic-data insertion/escaping is the cause.

  1. If you need dynamic min/max values, build the final filter as plain text before it reaches the plugin (so Bubble does not insert JSON quoting). Two approaches:
  • Create a single text field on the page (or a custom state) and set it with a workflow that composes the full filter string (e.g. Mfr_active:true AND ... (Depth > [min] AND Depth < [max]) ...) and then reference that page field (not a dynamic expression nested inside JSON). Using a workflow action to set a text value avoids Bubble double-escaping when rendering plugin properties.
  • Or call Algolia from the API Connector (server-side) where you control the raw request body and can pass the filter string exactly.
  1. Verify outside Bubble - paste the same filter into Algolia’s dashboard Search inspector or use Postman/cURL to confirm the syntax works outside Bubble. If it fails there too, we’ll know the filter expression needs changing.
  2. Alternative (index-time fix, recommended for stability) - add a precomputed boolean attribute at index time, such as depth_in_90_100:true or width_in_90_100:true. Then your filter becomes:
Mfr_active:true AND Product_active:true AND (depth_in_90_100:true OR width_in_90_100:true)

This avoids complex runtime boolean logic and totally sidesteps Bubble-escaping problems.

Why this is happening (short)

  • Bubble is inserting escaping/quotes when plugin property contains dynamic parts or when the editor serializes the property into JSON for the request. Algolia needs the raw, unescaped filters string.

If the static string above still results in escaped quotes in the API call, please paste a screenshot of the exact plugin property (the Filters box) after you saved it - we’ll check whether the plugin or Bubble is altering it on save.

Also tell us whether you used purely static text or any dynamic tokens when testing.

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

Thanks. This data helped a lot.

I took your recommendation and tested out precomputed boolean attribute.

"filters": "\"Mfr active\":true AND \"Product active\":true AND (Depth_in_5_100:true or Width_in_5_100:true)"

This got rid of the error! However it returned no results back. This was an unexpected result since the screenshot shows as least 1 product that fits the criteria.

Does using the precomputed boolean attribute need a different set up in Algolia, e.g attributesForFaceting? I currently have Depth and Width set up for ‘filter only’.

Hi @andrewmccalister,

Thanks for sharing the progress on precomputing the booleans.

The behaviour you describe (no error but 0 hits) usually means Algolia isn’t actually seeing the boolean attribute in the indexed record or the attribute isn’t enabled for filtering. Quick checklist and step-by-step to find/fix it:

  1. Confirm the attribute exists in the record
  • Open the record in the Algolia Index (dash → Records) and view the raw JSON for that specific object. Verify you see exactly Depth_in_5_100: true (boolean) and/or Width_in_5_100: true. Case and spelling must match exactly.
  1. Ensure the attribute is allowed for filtering
  • In Index settings → Facets, add Depth_in_5_100 and Width_in_5_100 (if not present) and set them as Filter only (or selectable for faceting). Save and reindex (if required).
  1. Test a minimal filter in Algolia’s Search Inspector
  • Use the Search inspector in Algolia and run:
    filters: Depth_in_5_100:true
  • does this return the expected hit(s)? If yes, the attribute is good and we can combine filters. If no, the attribute is missing / not boolean.
  1. Try the combined filter (once 1–3 pass)
  • In the inspector use:
    Mfr_active:true AND Product_active:true AND (Depth_in_5_100:true OR Width_in_5_100:true)
    This is the same string you’ll pass from Bubble once the attributes are confirmed.
  1. Common pitfalls to check
  • The attribute value must be a boolean true (not string "true").
  • Attribute names are case-sensitive and must match exactly in both the record and the filters string.
  • If you use Bubble plugin UI and see escaping/quotes again, test the same string directly in Algolia’s Search inspector or via Postman to isolate whether Bubble is altering the request.

Another option would be pasting the raw JSON of one of the product records (from Algolia dashboard) and a screenshot of your Facets settings - we’ll check the attribute name, type, and faceting setting and tell you the exact next step.

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

Hi @andrewmccalister,

Quick check - did you get a chance to run the Algolia checklist we sent (confirm the boolean exists in the record JSON, enable it for filtering/facets, test the minimal filter filters: Depth_in_5_100:true, then try the combined filter)? :slightly_smiling_face:

If you’re still seeing 0 hits, could you paste the raw JSON of one product record from Algolia and a screenshot of your Facets/index settings? We’ll take it from there.

Thanks - looking forward to your update.

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

Hi, thanks for following up.

I think there was a misunderstanding. The attribute is Depth and it has a numerical value, i.e Depth: 5(See screenshot).

I don’t have any attributes that are Depth_in_5_100. So If I search Depth_in_5_100:true I presume it’s looking for a specific attribute called Depth_in_5_100 (which I don’t have) rather than a Depth value between 5 → 100. Did I misunderstand that?

To clarify - I’m trying to search all records that have either a Depth that is >=5 or <=100 OR a Width >=5 or <=100.

Solution was actually very simple, I just missed it when I was reading the docs:

"filters": "\"Mfr active\":true AND \"Product active\":true AND (\"Depth\": 5 TO 100 OR \"Width\":5 TO 100)"

Hi @andrewmccalister,

Great, thanks for confirming.
We’re glad it was a simple find and that the filter string worked as expected.

If there is anything else we can help with, don’t hesitate to reach out.
Always happy to help!

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