Solr 的 DataImportHandler 文档提供了实体查询属性的表。
这并不是非常具有描述性。有人可以在这里表达这些查询属性之间的区别和相互作用吗?我见过一些代码使用 deltaQuery 和 ParentDeltaQuery 来支持嵌套实体,我还见过其他代码使用 deltaQuery 和 deltaImportQuery。
选择其中一个而不是另一个的目的是什么?
最佳答案
我现在在 Solr Wiki 中看到它:
* The query gives the data needed to populate fields of the Solr document in full-import
* The deltaImportQuery gives the data needed to populate fields when running a delta-import
* The deltaQuery gives the primary keys of the current entity which have changes since the last index time
* The parentDeltaQuery uses the changed rows of the current table (fetched with deltaQuery) to give the changed rows in the parent table. This is necessary because whenever a row in the child table changes, we need to re-generate the document which has that field.
我在第一次通过时错过了这个解释,并希望该信息出现在我发布的表格中。奇怪的是,《Solr In Action》用了不到 1 页的 600 篇文章来解释如何使用 DataImportHandler 读取数据库。
关于Solr:deltaQuery/parentDeltaQuery/deltaImportQuery,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39172796/