Solr中的数据导入处理程序

时间:2011-03-05 09:55:18

标签: java mysql solr dataimporthandler

我正在尝试MySQL数据库的数据导入处理程序。

我在solrconfig.xml中添加了DIhandler,根据我的数据库方案创建了一个data-config.xml,并在schema.xml中添加了一个不同的字段。我正在连接MySQL数据库

我连接后运行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."

xml文件位于此http://pastebin.com/iKebKGSZ

1 个答案:

答案 0 :(得分:1)

<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" />

这些字段是否也在schema.xml

我无法在pastebin链接中看到它们。确保您的架构中也包含所有字段。