Services Plugins FAQs

Algolia Search V2.0: How to configure Repeating group for nested arrays

Hello there!

I’m enjoying the Algolia Search V2.0 plugin a lot. Way better and more flexible than the native Bubble integration.
But there’s one particular scenario I can’t find how to properly configure some nested repeating groups.

The data in the Algolia index has this structure:

{
   "id": 123,
   "name": "Joe Doe",
   "tags": [ "tag_1", "tag_2", "tag_3"] 
}

The page contains a Repeating Group (outer Repeating group) to present the search results in a list with 2 columns; name and tags.

  • The first column is a simple text field to present the name;
  • The second column contains another Repeating Group (inner Repeating Group) to present the list of tags;

The outer Repeating Group works perfectly with the data source as “AlgoliaSimpleSearch A's Result's field1”.

The TextField for column name works as I’d expect with the content set as “AlgoliaSimpleSearch A's Result's field2:item#Current cell's index

I’m struggling to properly set the Data Source of the Inner Repeating Group.

When I set it as AlgoliaSimpleSearch A's Result's field3, the result is that the column “tags” for each search result shows all tags from all results.

When I set it as AlgoliaSimpleSearch A's Result's field3:item#Current cell's index (as I did for field name) Bubble shows an error stating the expression evaluates to a number, instead of a List of Texts.
Screenshot 2024-07-30 at 19.13.46

In case it’s relevant, the tags array always has at least one element. It’s never empty.

What am I missing here? I couldn’t find this nested scenario in the docs or the tutorial videos.

I’d really appreciate any tips or reference to some documentation.

Thanks a lot!
– Mauro

Hi @maurorezende ,

Thank you for reaching out and sharing your feedback. It’s great to hear you find the plugin useful and adaptable for your project. :hugs:

Regarding your question, you seem to be on the right track. There could be a few adjustments you could try to ensure the inner Repeating Group displays the tags correctly. Here are some steps you might consider:

  • Verify Outer Repeating Group Data Source: Ensure it’s set to AlgoliaSimpleSearch A’s results.

  • Check TextField for Name: Make sure it displays the name using Current cell’s Algolia result’s name.

  • Adjust Data Source for Inner Repeating Group: Set it to Current cell’s Algolia result’s tags to correctly link each set of tags to its corresponding item.

  • Review Error Messages: If Bubble still indicates errors, double-check your Algolia index structure and the names of fields in your expressions.

  • Seek Further Guidance: You might consider consulting the Bubble forums or support for more specific advice, especially for complex configurations like nested repeating groups.

  • Utilize Bubble’s Debugger: Running your page in debug mode can also help identify any binding issues.

Please also check our demo page and documentation for more information and example on setting up.

I hope these suggestions help refine your setup. If you have any further questions or encounter issues with the plugin, please do not hesitate to reach out.

Thank you once again, and I wish you a great day ahead!

Best regards,
Stefan

Hi @Stephan ,

Sorry for the delay. I’m back on this particular task and will investigate the points you mentioned.
Thanks a lot for taking the time to read my message and write such a thorough list of suggestions.

Best,
– Mauro

1 Like

Hello @maurorezende,

Thank you for your message.

Yes, please take your time to review everything on your end. Should you have any further questions or encounter any difficulties, do not hesitate to let us know.

Thanks again, and I wish you a great day ahead! :pray:

Best regards,
Stefan