3
votes

I am trying the Data Import Handler for MySQL Database.

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. I am connecting with MySQL database

After i connect and I run the dataimport?command=full-import i get this response

"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

1
Can you find any error messages in server's log? I'm not really sure you can use backslashes when specifying the config param of data import handler. Since it's in your conf directory, you can only specify the file name: <str name="config">data-config.xml</str> What happens when you click on Document count action on data import page? - Marko Bonaci
Please post your data config file. It is probably just a simple connection issue. - JustEngland
Yeah, maybe provide a relative path to the config file rather than the Windows format absolute path - Joyce
Try running the queries which are there in config, which you use to check if you really get results from those queries - Raks

1 Answers

1
votes
<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?

I couldnt see them in the pastebin link. Make sure you have all fields in your schema as well.