I’m just wondering has anyone had success in pushing data to Algolia for indexing and searching using business logic? I’m quite surprised that nobody has written about it yet.
I’m trying to use guidance provided by algolia https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/how-to/importing-with-the-api/#send-the-data-to-algolia , but all I get is just the name of my table on Algolia side.
Is it possible?
I am not familiar with their API and cannot help you with that, however, if there is something that is not working on the Backendless side of things, please let us know.
I have this code, but I think there is something wrong in it. Could you help me?
function fetchDataFromDatabase() {
const products = Backendless.Data.of(‘products’)
return products;
}
class AlgoliaService {
async pushData() {
const records = fetchDataFromDatabase();
index.addObjects( records );
}
}
Backendless.ServerCode.addService( AlgoliaService );
sergey.kuk
(Sergii Kukurudziak)
April 1, 2019, 9:34am
4
Hello @Niam_frost ,
this code do not fetch the data. Here it is an example of getting data:
Backendless.Data.of( "TABLE-NAME" ).find()
.then( function( result ) {
})
.catch( function( error ) {
});
Please check out the following documentation Basic Object Retrieval - Backendless SDK for JavaScript API Documentation
Also, check out documentation about paging Data retrieval with Paging - Backendless SDK for JavaScript API Documentation
Thanks, this helps a lot!
Спасибо