I'm trying to update my index, but I keep on getting the error:
org.apache.solr.handler.dataimport.DataImporter verifyWithSchema INFO: UPC is a required field in SolrSchema . But not found in DataConfigfound in DataConfig
I can't figure out why it's complainting, since:
- the first time I ran the import, it worked fine, and the only thing I changed was add a few fields (columns) to schema.xml
the table I am querying indeed has a开发者_Go百科 UPC column. Here is what my data-config.xml looks like:
<dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/product" user="root" password="some_password"/> <document> <entity name="product" query="select * from productdetails"> </entity> </document> </dataConfig>
But again, the interesting part is that the import worked a second ago, but fails on re-import. I'm hoping somebody has had this problem before. If not, maybe someone can suggest other things to check for?
The reason for this is that when DataImportHandler starts it checks its config against your loaded schema. It is not an error, merely a warning. To remove it you have to add a specific field in your import config with a name that matches your required field.
This is not the cause of your failed reimport as this is simply a warning.
精彩评论