2

Solr supports updating, hence it is possible to develop a web app that stores all data within Solr. Is that a good idea?

Using just Solr, the user would update the Solr documents directly if they change something. For example, a user might edit a Recipe document to contain a new tag. This approach is good because the app simply has only one database.

Using two databases, the user updates the database as frequently as it needs to. Then, periodically the system updates the Solr index. This approach allows you to use the database technology to keep data consistent and doesn't require any slow rebuilding of Solr indexes.

For my particular application, writes to the database will be infrequent.

Which approach makes the most sense and will lead to the most stable system?

4

1 回答 1

3

如果您在数据库中的更新不频繁,那么使用DIH进行夜间增量导入很容易,这是人们使用 Solr 的典型方式(也就是说,不是他们数据的主要存储)。也有一些人使用 Solr 作为他们的主要商店,但这种情况要少得多,尽管当4.0发布时,它包含了一些改进,使得以这种方式使用它更容易。

于 2012-06-04T16:15:16.383 回答