Templates Plugins Courses

Algolia search v2.0 - Adding, updating and deleting

Hi there, I recently purchased the Algolia plugin for use on my bubble site. I realise this is my first post here, and hate to come across in a negative manner, however the tutorials and guides are very poor.

After following the guides, I had to piece a lot of information together by searching other forum posts (here and on bubble). I’ve now managed to get a decent search working with RPs, however I have no idea how to add a new entry, update it or delete it.

Can you provide further insight on how to do this? To give you an overview of where I’m currently at:

Creating: Haven’t got a clue how to do this. I have loaded entries manually into Algolia for testing.
Updating: I can send information to Algolia, and see in the Algolia logs that it has received some info. However, the information (such as “description”, which is text), is an empty string in Algolia. Also, how do I tell Algolia which entry is being updated?
Deleting: I’m guessing that if I have the answer to the “Updating” then I’ll be able to work this out for myself.

Looking forward to some help here, I’ve been tearing my hair out for a few days now!

Hello @matt ,

I am sorry to hear about your bad experience with our documentation. We always strive to provide a clear explanation and relevant examples in our docs and demo. Thank you for sharing your experience! Each feedback helps us to understand where the improvements are needed and how to provide a better experience to our customers.

Regarding your questions:

New record can be created by using the action “Algolia - Update Object”.
image
In the field Application ID, you should insert the app ID from the Algolia dashboard.
image
In the field Index Name, you should insert the index from Algolia
image
In the field Object ID, you should insert the id that doesn’t match with any record from Algolia and in the field Content, you should insert the content that you want to add in the record.

For updating the record is used the same action as above “Algolia - Update Object” but in this case should be specified the ID of the existing object. You can find the Object ID at the bottom of the record from Algolia.
image

For deleting is used the action: “Algolia - Delete Object”. The data Application ID, Index Name, and Object ID should be completed the same as in the case of updating/creating.

I hope this will help you!

Please let me know if you have any other questions.

Best Regards,
Alex.

Hi Alex,
Thanks for replying. So I use the update option to also create a new entry. That seems ok, however can you answer my other questions? In particular, how do I get the ID of the object that is being updated in Algolia?

Working as follows:
Editing thing in Bubble > Send updates to Algolia. How do I retrieve the ID (objectID) of the thing I’m updating in Algolia?

Just another quick update not related. All email from the forum hits my junk email ([email protected]). It looks like you need to add some records:
https://mxtoolbox.com/SuperTool.aspx?action=mx%3Aforum.zeroqode.com&run=toolpage
https://mxtoolbox.com/SuperTool.aspx?action=spf%3Aforum.zeroqode.com&run=toolpage
https://mxtoolbox.com/SuperTool.aspx?action=mx%3Azeroqode.com&run=toolpage
https://mxtoolbox.com/SuperTool.aspx?action=spf%3Azeroqode.com&run=toolpage

Hi @matt,

The best way to manage the connection between Bubble and Algolia databases is to make sure that the IDs of the objects match. You can use the Bubble IDs as object IDs in Algolia. In this case, you will know the ID of the edited record in Algolia by looking at the ID of the thing in Bubble.

Regarding the email, thank you for reporting, we will check this issue.

Best Regards,
Alex.

Your documentation is improving - thank you. A couple of questions if I may:

  1. The Content field needs to have dynamic data like person name, address, postal code etc. - why not make it a bigger field with some easy way of formatting the required array? Can you suggest an easy way to do this? I tried entering a record manually in Algolia and then copying and pasting that code here. Very much a pain with the narrow field!

  2. Some of my Bubble fields are lists of things - which goes within this field - what’s the best way of formatting that? Like a person having a ‘current_address’ and a list of “previous_addresses”.

So your plugin field will have { “current_address”: “xyz”, “previous_addresses”: …?}

Hello @kenl ,

Thank you for reaching out!

We will check with our developers how can we solve the issue with a too narrow field. I will inform you when we will have a solution.

Regarding your second question yes, this is the right format.

Best Regards,
Alex

Further clarification on (2):

We need to send a list of texts (unique IDs) from Bubble to Algolia. This is the key filter that we need to filter and display results to relevant users. I have tried several lexical changes to try and send this to Algolia and none of them manage to separate the values into an array on Algolia.

So “clinic-id”: [ “1536232858086x615867118131” “15452353x5867118131085300” ] is what I want to create on Algolia, but we get this currently:
“clinic-id”: [ “1536232858086x615867118131, 15452353x5867118131085300” ] - essentially a long single record in the array and therefore unusable as a filter.

Any ideas how to resolve this?

Hello @kenl,

Sorry but yet we don’t have a solution for your first query. Our team is working on it. I also will check with our devs your second clarification. We will notify you when we will have a solution.

Best Regards,
Alex

I’ve worked this out - we can use the ‘join’ text operators to segment the contents of the list. Thanks anyway.

2 Likes

Hello @kenl,

Our developers have checked the plugin and unfortunately, the Content field cannot be made bigger. We are sorry that but there are design limitations that we cannot change.

Best Regards,
Alex

I’m hoping someone can help me with deleting multiple items from Algolia. When I delete a user in Bubble, I want all their corresponding data in Algolia to be deleted as well.

Thanks in advance for any help!

Hi @dimitrimanaigo,

Thanks for reaching out. Unfortunately, it is possible to delete a single object only. Our plugin doesn’t support deleting multiple items I’m afraid.

As you can see, it can only take a single Object ID to be deleted.

However, we’ve taken your feedback into account and will look into future possibility for improvements!

Best,
Alex

HI @alexander

good day~!

Is there a way to index records to algolia in bulk?

“Algolia - Update Object” in workflow doesn’t seem to allow us to index in bulk.

However as per Zeroqode documentation (https://docs.zeroqode.com/plugins/algolia-search-plugin)

This action can be started as “Bulk” in the Bubble database. This way, the synchronization between Bubble and Algolia will be very fast, 10k updates / 1 min.

Hi @hwgz01,

Thanks for reaching out. Unfortunately, it is not possible to update/delete in bulk. It is only possible with a single Object ID. As per our documentation instruction regarding “Bulk”, it actually means that you could use multiple actions but for separate object IDs for a single event, meaning it bulks these updates.

Hope it helps and thank you for understanding.

Best,
Alex