简体   繁体   English

Solr中的数据导入处理程序

[英]Data Import Handler in Solr

I am trying the Data Import Handler for MySQL Database. 我正在尝试MySQL数据库的数据导入处理程序。

I added the DIhandler in solrconfig.xml, created a data-config.xml according to my database scheme and also added a field in the schema.xml which was different. 我在solrconfig.xml中添加了DIhandler,根据我的数据库方案创建了一个data-config.xml,并在schema.xml中添加了一个不同的字段。 I am connecting with MySQL database 我正在连接MySQL数据库

After i connect and I run the dataimport?command=full-import i get this response 我连接后运行dataimport?command=full-import我得到了这个响应

"00C:\solr\conf\data-config.xmlfull-importidle1102011-03-05 15:01:04Indexing completed.    Added/Updated: 0 documents. Deleted 0 documents.2011-03-05 15:01:042011-03-05  15:01:040:0:0.400This response format is experimental. It is likely to change in the future."

The xml files are in this http://pastebin.com/iKebKGSZ xml文件位于此http://pastebin.com/iKebKGSZ中

<field column="manu" name="manu" />
<field column="id" name="id" />
<field column="weight" name="weight" />
<field column="price" name="price" />
<field column="popularity" name="popularity" />
<field column="instock" name="inStock" />
<field column="includes" name="includes" />

Are these fields also in your schema.xml ? 这些字段也在schema.xml吗?

I couldnt see them in the pastebin link. 我无法在pastebin链接中看到它们。 Make sure you have all fields in your schema as well. 确保您的架构中也包含所有字段。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM