简体   繁体   English

mysql + solr,或单独使用solr

[英]mysql + solr, or solr on its own

Ive got the option to build an application storing the data in mysql and then using solr to speed up the queries for data. 我可以选择构建一个将数据存储在mysql中的应用程序,然后使用solr来加速数据查询。

However, im wondering whether it would be a good idea to skip mysql altogether and just use solr as the database? 但是,我想知道完全跳过mysql而仅将solr用作数据库是否是一个好主意? Is there any good reason why I should use mysql as the storage and solr as the fast index for the data? 有什么充分的理由为什么我应该使用mysql作为存储并且使用solr作为数据的快速索引?

These DBs server different purposes, it very much depend on your application (and type of data you store) on whether you should use only Solr or also MySQL. 这些数据库服务器有不同的用途,这在很大程度上取决于您的应用程序(以及存储的数据类型),是应仅使用Solr还是MySQL。 MySQL is good to store data with a lot of relations and tables (tables related with each other). MySQL可以很好地存储具有大量关系和表(彼此相关的表)的数据。 Solr is good to textual search (and as you say: fast index), and in case you do not have a lot of "related data" you can indeed store that data in the same documents. Solr对于文本搜索(如您所说:快速索引)很有用,并且如果您没有很多“相关数据”,则可以将这些数据确实存储在同一文档中。 There are people that indeed are using only Solr to store their DBs... but I still think RDBMs can be nice for some types of data. 确实有一些人只使用Solr来存储他们的数据库...但是我仍然认为RDBM对于某些类型的数据可能很好。 For example: if you want to allow quick search on users of a system and also store their full profile, and several information details... It is good idea to use Solr for quick search of users (possibly retrieving their unique ID), but then MySQL (or also possibly some NoSQL DB... but this probably is another discussion) can be better candidate to store all the user related data (that does not need textual search). 例如:如果您想允许快速搜索系统用户并存储他们的完整个人资料和一些信息详细信息,则最好使用Solr快速搜索用户(可能检索其唯一ID),但是那么MySQL(或者可能还有一些NoSQL DB ...但这可能是另一个讨论)可以更好地存储所有与用户相关的数据(不需要文本搜索)。

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

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