solr DIH中的delta-import问题

Bra*_*Rao 1 solr dataimporthandler

当我运行full_import命令时它工作正常.更新的日期将写入dataimport.properties文件.当我运行delta-import时,它会使Indexing失败.回滚所有更改.. dataimport.properties文件已创建,并在solr/conf/location中具有777权限.

请帮我解决这个问题.


@mbonaci

data-config.xml中的查询,deltaImportQuery和deltaQuery如下所示

    <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 &gt; '${dataimporter.last_index_time}'" deletedPkQuery="select group_id  from  collaboration_groups  where group_status = 0 and updated_date &gt; '${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>
Run Code Online (Sandbox Code Playgroud)

config.xml中dataImport请求处理程序的config参数如下

<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">/var/solr/data-config.xml</str>
</lst>
</requestHandler>
Run Code Online (Sandbox Code Playgroud)

Mar*_*aci 9

我注意到,在deltaImportQuery你引用的id(在deltaQuery中不存在)而不是group_id.在这一行:

...and group_id=${dataimporter.delta.id}"
Run Code Online (Sandbox Code Playgroud)

由于deltaQuery中的PK是group_id,因此查询的这一部分应如下所示:

...and group_id=${dataimporter.delta.group_id}"
Run Code Online (Sandbox Code Playgroud)

我有同样的问题,因为我不明白${dataimporter.delta}事实上代表了什么deltaQuery.