gpt4 book ai didi

SOLR:索引失败。回滚所有更改。

转载 作者:行者123 更新时间:2023-12-05 01:37:43 24 4
gpt4 key购买 nike

我在 dataconfig_1.xml 中有以下内容

<?xml version="1.0" encoding="UTF-8"?><dataConfig>  <dataSource batchSize="-1" convertType="true" driver="com.mysql.jdbc.Driver" password="solrpw" url="jdbc:mysql://127.0.0.1/solrDB" user="solruser"/>  <document name="items">    <entity name="root" pk="id" preImportDeleteQuery="data_source:1" query="select a.id, a.body, a.headline  title ,a.date  datecreated, a.title_id ,t.name  publisher_name from article as a inner join title as t on t.id=a.title_id" transformer="TemplateTransformer" deltaImportQuery="select a.id, a.body, a.headline  title ,a.date  datecreated, a.title_id ,t.name  publisher_name from article as a inner join title as t on t.id=a.title_id where last_update_time > '${dataimporter.last_index_time}'" deltaQuery="select id from article where last_update_time > '${dataimporter.last_index_time}'">      <field column="data_source" template="1"/>      <field column="data_source_type" template="Jdbc"/>      <field column="data_source_name" template="syndigate_solr"/>    </entity>  </document></dataConfig>

在 dataimport_1.properties 中我有

#Tue Aug 02 06:53:21 UTC 2011last_index_time=2011-08-02 06\:52\:51root.last_index_time=2011-08-02 06\:52\:51

现在每当我运行 deltaimport

http://myip:8888/solr/collection1/dataimport_1?command=delta-import

我得到了以下回复

<response><lst name="responseHeader"><int name="status">0</int><int name="QTime">8</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">dataconfig_1.xml</str></lst></lst><str name="command">delta-import</str><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"><str name="Time Elapsed">0:0:1.552</str><str name="Total Requests made to DataSource">2</str><str name="Total Rows Fetched">18954</str><str name="Total Documents Processed">0</str><str name="Total Documents Skipped">0</str><str name="Delta Dump started">2011-08-02 09:35:52</str><str name="Identifying Delta">2011-08-02 09:35:52</str><str name="Deltas Obtained">2011-08-02 09:35:52</str><str name="Building documents">2011-08-02 09:35:52</str><str name="Total Changed Documents">18954</str><str name="">Indexing failed. Rolled back all changes.</str><str name="Rolledback">2011-08-02 09:35:52</str></lst><str name="WARNING">This response format is experimental. It is likely to change in the future.</str></response>

知道我做错了什么吗?感谢您的帮助

最佳答案

我调试 jdbc 导入错误的方法是使用 log4jdbc library .我会像这样在 data-config.xml 中创建一个新的数据源

<dataSource name="logMe" driver="net.sf.log4jdbc.DriverSpy" user="myUserName" password="myPassword" type="JdbcDataSource" url="jdbc:log4jdbc:mysql://myServer:3306/myDB" />

并设置所有实体使用这个新的数据源。

然后我会运行导入。之后,我将查看名为 sql.log 的日志文件。在文件的底部,它通常会告诉我 jdbc 在哪里停止以及出现什么错误。

关于SOLR:索引失败。回滚所有更改。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6910138/

24 4 0