當我運行full_import命令時,它工作正常。更新的日期被寫入dataimport.properties文件。當我運行delta-import時,索引失敗。回滾所有更改。dataimport.properties文件已創建,並具有solr/conf/location中的777權限。solr DIH中的delta導入問題
請幫我解決這個問題。
@mbonaci
查詢,deltaImportQuery和deltaQuery在數據-config.xml中是如下
<entity name="item" query="select group_title,description,DATE_FORMAT(created_date, '%Y-%m-%dT%H:%i:%sZ') as createdDate,group_status, 'GROUP' as itemtype,group_id as id from collaboration_groups where group_status=1"
deltaImportQuery="select group_title,description,DATE_FORMAT(created_date, '%Y-%m-%dT%H:%i:%sZ') as createdDate,group_status,group_id as id,'GROUP' as itemtype from collaboration_groups where group_status=1 and group_id=${dataimporter.delta.id} "
deltaQuery="select group_id from collaboration_groups where group_status=1 and updated_date > '${dataimporter.last_index_time}'" deletedPkQuery="select group_id from collaboration_groups where group_status = 0 and updated_date > '${dataimporter.last_index_time}'">
<field column="id" name="id" />
<field column="itemtype" name="itemtype" />
<field column="group_title" name="fullName" />
<field column="description" name="description"/>
<field column="createdDate" name="createdDate"/>
</entity>
config.xml中的dataImport請求處理程序的配置參數如下
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">/var/solr/data-config.xml</str>
</lst>
</requestHandler>
請檢查我的帖子 – 2011-03-06 06:13:06