🔍 Algolia Search - New Plugin from Zeroqode

Hello,

I just used the delete object call and it delete my entire index. Please help.
Screen Shot 2022-09-13 at 9.20.14 AM

I figured out the issue. I delete the object in bubble before the Algolia action, so there was no ID to send to Algolia. Apparently without an object ID the API call to delete the entire index is the same API call without an object ID. That is very concerning.

Hello @rosshelton

Thanks for reaching out.

Would you mind sharing the workflows and your particular use case and what are you trying to achieve? To delete the object, the ID should be present, so that the plugin can delete the object with that ID.

Looking forward to your reply.

Regards,
Zeroqode Support Team

Hello,

I already wrote a different workflow to solve the issue.
It’s pretty simple, if you don’t present an object ID when deleting an Algolia object, it will delete the whole index you have specified. In my case I was deleting a bubble item, but I didn’t put the delete Algolia function before the delete bubble item. In the workflow there was no Object ID to pass to the Algolia delete function, because it had already been deleted in bubble. . This led to the whole index being deleted.

Hello,

Is there a way to delete a list of algolia? I have projects in my app. In those projects I have line items associated to that project. I want to be able to delete all the Algolia that are associated with certain projects after a customer cancels their project.

Currently the customer is using faceting to filter their search to their current project. I just need an effective way to delete the Algolia to keep my Algolia bill low.

Some of my projects have thousands of Algolia that need to be deleted and I would hate to have the use the bubble backend scheduler to run that many times.

Is this possible with your plugin? Or can it be added?

Thanks!

Hello @rosshelton

Currently, it is not possible to delete a list of Algolia, however, we will investigate adding a such feature in the next plugin update. Once the investigation is completed, we’ll get back to you with more details.

Regards,
Zeroqode Support Team

Thanks for your patience @rosshelton

We have updated the plugin and added the possibility to delete a list, please upgrade to Version: 3.28.0 to see the changes.

In case you have any other questions, just let us know.

Regards,
Zeroqode Support Team

Hello, is it possible to add a function to this plugin? Instead of having to send thousands of individual records, it would be great to batch them by hundreds or a thousand.

Algolia - Add Object List

Hello, @rosshelton
Thanks for reaching out.

Please allow us to check if that is possible here and revert with an update ASAP.
Thanks for your understanding.

Best regards,
Zeroqode Support Team

Hello, @rosshelton

In order to better understand your request, can you please let us know how exactly you want to batch data - by attribute or by records?
There are 2 possibilities:

We are looking to hearing from you soon.
Best regards,
Zeroqode Support Team

I want to be able to send a list of records to Algolia for creation. Currently you plugin only allows one record creation at a time. I need the ability to send a larger JSON lists of objects to be created. If I was to use the bubble backend API one at a time it would take hours to send each object one at at time. Below is a link to Algolia’s discussing sending batches to their API.

" Sending records in batches#

Algolia lets you send one or more records in a single API call, or batch records. You can batch your indexing operations via the API or the dashboard.

For optimal indexing performance, you should send your records in batches. An ideal batch size is ~10 MB, which represents between 1,000 or 10,000 records depending on the average record size.

Batching has several benefits: it reduces network calls and speeds up indexing. Users with lots of records see the most significant impact on performance, but every Algolia user should batch indexing operations whenever possible.

Batching doesn’t change how Algolia counts indexing operations. Every indexing operation adds to your count. If you send several records, each of them still counts as one operation."

Something like the code below.

const Algolia = require(‘algoliasearch’);

const client = Algolia(process.env.ALGOLIA_APP_ID, process.env.ALGOLIA_API_KEY);
const index = client.initIndex(‘you_index_name’);

const objects = [
{objectID: ‘1’, name: ‘John’, age: 26},
{objectID: ‘2’, name: ‘Jane’, age: 29},
{objectID: ‘3’, name: ‘Jack’, age: 33}
]

return new Promise((resolve, reject) => {
index.saveObjects(objects, (err, content) => {
if (err) reject(err)
resolve({
statusCode: 200,
body: content
})
})
})

Hello, @rosshelton
Thanks for these details.

We will discuss whether that is possible with our plugin right now. We will revert to you with an update at the nearest time.

Best regards,
Zeroqode Support Team

Thank you for looking in to it. If there is anything you need, let me know.

1 Like

Hi may I ask why I cannot retreat values as shown? The Algolia element cannot be invisible?

If it’s the API keys setup issue, why the naming is so different with Algolia’s official names???

Also, The docs are not helpful at all as there is no plugin content (elements, data calls and etc) explanation.

Hello, @Rangduju
Thanks for yourquestion.

We need to highlight that we have pretty detailed documentation for this plugin. Under the Bubble Setup and Usage section, we have quite a detailed list of plugin content described:

We named all the fields according to some rules, however, we have a lot of information about using all the keys.
For example, you can quickly check our free course for the setup of the Algolia plugin (The second lesson shows how to set up API keys) :

In order to help you and investigate the root cause of the issue and how to fix it, please share with us as many details as possible about your current setup of Algolia and the plugin itself.

We are looking to hearing from you soon.
Best regards,

1 Like

Hello,

I wanted to check in and see if you think this is possible? If not, I will start looking to build other options.

Thanks!

Thanks for pointing out, I am all set with my appology to this great plugin! The only thing wrong is “docs font too small that could be barely seen”.
image

One special tip for others who got this error to use “:formatted-as-JSON-safe” method mentioned in this post.

Raw error: {"message":"lexical error: invalid character inside string. Around '�醒)。'","status":400}

Just to remember to remove quotations as the method already comes with it.
image

Hello, @rosshelton
Thanks for your patience.

Our team is still working on that update, but we are at the finish line.
We will let you know once it will be ready.

Best regards,
Zeroqode Support Team

1 Like

Hello, @Rangduju
Thanks a lot for your appreciation.

We are happy that you are sharing some useful information here.
In case we can help you with anything else - let us know.

Best regards,
Zeroqode Support Team

Fantastic! I will stand by.

1 Like

Friends!

Let’s continue our conversation in this thread:

:slightly_smiling_face:

2 Likes