[英]What is the recommended way to store data for search in elasticsearch
Let's say I use Elasticsearch in my application for searching restaurants near me.假设我在我的应用程序中使用 Elasticsearch 来搜索我附近的餐馆。 I get all sorted restaurants id from Elasticsearch.我从 Elasticsearch 获得所有排序的餐厅 ID。 And using these ids, I get all data like name, location, popular menus of restaurant from RDB.使用这些 id,我可以从 RDB 获取所有数据,例如名称、位置、餐厅的热门菜单。
As you can guess, it takes some time to get data from RDB.如您所料,从 RDB 获取数据需要一些时间。 If I store all data used by application in Elasticsearch, then I can make it faster.如果我将应用程序使用的所有数据存储在 Elasticsearch 中,那么我可以让它更快。 But I'm wondering what is the recommended way to store data in Elasticsearch and what to consider for choosing it.但我想知道在 Elasticsearch 中存储数据的推荐方法是什么,以及选择它时要考虑什么。
I think there are some ways like below,我认为有一些方法如下,
Thanks!谢谢!
This is a very interesting but very common question and normally every application needs to decide this, I can provide some data points which would help you to take a informed decision.这是一个非常有趣但非常常见的问题,通常每个应用程序都需要对此做出决定,我可以提供一些数据点来帮助您做出明智的决定。
Every search system has its own functional and non-functional requirement and based on above points, hope you got more information, which will help you take a better decision.每个搜索系统都有自己的功能和非功能需求,基于以上几点,希望您能得到更多信息,这将有助于您做出更好的决定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.