SolR的数据导入处理程序跟踪但忽略嵌套实体的更改



我有两个表,我正试图使数据导入处理程序在子实体更改时更新文档的索引。当我启动&;delta-import&;命令,我得到以下内容:

{
"responseHeader":{
"status":0,
"QTime":3},
"initArgs":[
"defaults",[
"config","db-data-config.xml"]],
"command":"delta-import",
"status":"idle",
"importResponse":"",
"statusMessages":{
"Total Requests made to DataSource":"5",
"Total Rows Fetched":"3",
"Total Documents Processed":"0",
"Total Documents Skipped":"0",
"Delta Dump started":"2021-08-16 11:05:47",
"Identifying Delta":"2021-08-16 11:05:47",
"Deltas Obtained":"2021-08-16 11:05:47",
"Building documents":"2021-08-16 11:05:47",
"Total Changed Documents":"0",
"Time taken":"0:0:0.12"}}

数据配置如下:

<dataConfig>
<dataSource driver="org.mariadb.jdbc.Driver" url="jdbc:mysql://localhost:3306/eepyakm?user=root" user="root" password="root"/>
<document>
<entity name="supplier" query="select * from suppliers_tmp_view"
deltaQuery="select id from suppliers_tmp_view where last_modified > '${dataimporter.last_index_time}'"
deltaImportQuery="select * from suppliers_tmp_view where id='${dataimporter.delta.id}'">


<entity name="attachment"  
query="select * from suppliers_tmp_files_view where supplier_tmp_id='${supplier.id}'"
deltaQuery="select id from suppliers_tmp_files_view where last_modified > '${dataimporter.last_index_time}'"
parentDeltaQuery="select id from suppliers_tmp_view where id='${attachment.supplier_tmp_id}'">
<field name="path" column="path" />
</entity>

</entity>
</document>
</dataConfig>

在我的理解,"总行读取"显示子实体表中的3个条目发生了变化。那么,它为什么不索引改变后的字段呢?

如果我输入"full-import"它可以很好地选择更改

您的查询都不包括supplier_tmp_id-但您仍然在parentDeltaQuery中引用它。

你想在你的SELECT语句中也选择这一列。

相关内容

  • 没有找到相关文章