简体   繁体   English

如何优化算法索引以改善用户体验

[英]how to optimize algoia indexing to improve user experience

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 我想在我的php Web应用程序中实现ALGOLIA搜索,因为我必须索引我在algolia服务器中的记录,就像是否有用户在我的应用程序中注册一样,我不仅要在我的数据库中而且还要在algolia服务器中插入其数据,因为该用户在应用中将面对的小腿可能是几秒钟,也可能是几微秒,但这很重要

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) 我在考虑nodejs是否有可能在node js中触发事件以更新algolia服务器上的索引并响应用户而无需等待algolia响应(nodejs的新蜂)

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 . 每当用户向应用程序中添加新内容时,1 /将其保存到数据库中,然后2 / 将其推送到Algolia,而无需使用waitTask方法 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. 这样,对您的应用程序性能和用户体验不会有任何影响。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM