solr dataimport error: Indexing failed. Rolled back all changes

旧巷老猫 提交于 2019-12-02 04:11:59

I kept receiving the same error message at some point in time.For me there were the following reasons:

  • bad connection string.
  • Bad driver (com.mysql.jdbc.Driver)
  • bad query
  • bad mapping of columns to solrfields ( I think it might be your problem too)

Make sure the name of the columns in the database is the same (case sensitive) as the name of the columns in SOLR. If not rename the colmuns name in the query:

select id as uniqueid, title as Tittle

or using the field element in the entity you defined like this:

<field column="ID" name="id" />

You are using the field element wrong. See here how you can use this element: http://wiki.apache.org/solr/DataImportHandler#Configuration_in_data-config.xml

If you can share other relevant data and logs we can give you more specific information.

Good luck.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!