Reputation: 39
I want to implement ALGOLIA search in my php web application for that i have to index my records in algolia server like if a user registered in my application i have to insert its data not only in my db but also in algolia server Due to that user will face little leg in application may be its of few second or may be in microsecond but it counts
so i want any alternative(background processing) of it so that algolia indexing dint effect the user experience
I am thinking about nodejs
is it possible to fire event in node js to update indexing on algolia server and respond to user without waiting for algolia response (am new bee to nodejs)
Upvotes: 0
Views: 111
Reputation: 465
By design, indexing is asynchronous, so you shouldn't need to wait that a record get indexed. Whenever a user adds something new to your application, 1/ save it your DB, then 2/ push it to Algolia without using the waitTask method. The new record will then be accessible as a search results a few milliseconds / seconds after it gets added to the index.
In that way, won't have any impact on your application performance and user-experience.
Upvotes: 1