简体   繁体   English

如何在弹性搜索中优化索引?

[英]How to optimize indexing in elastic search?

we are working on eCommerce project and trying to implement elastic search as a search engine and its working fine in search . 我们正在从事电子商务项目,并试图将弹性搜索实施为搜索引擎及其在搜索中的良好表现。

But now its time to index data to elastic search and we have very frequent updates in data so its not a good option to index data every time from php because it can face delay in output 但是现在是索引数据以进行弹性搜索的时候了,我们在数据中的更新非常频繁,因此它并不是每次从php索引数据的好选择,因为它可能会面临输出延迟

so what can we do to index data without compromising with user experience. 因此,我们可以做些什么来索引数据而又不影响用户体验。

is node js a better option for that? 是节点js更好的选择吗? can node js update data asynchronously without compromising with user experience ? node js可以在不影响用户体验的情况下异步更新数据吗?

You should decouple your frontend-serving from the ES indexing. 您应该将前端服务与ES索引分离。 This can for example be achieved if you post the indexing request to a message queue, such as RabbitMQ, and then have a worker process listening to that queue which actually triggers the ES indexing. 例如,如果将索引请求发布到消息队列(例如RabbitMQ),然后让工作进程监听实际上触发ES索引的队列,则可以实现此目的。

See 看到

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

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