Question

I'm new to Solr and having difficulties with the DataImportHandler. I get this message when the server starts:
Jan 27, 2010 12:27:22 PM org.apache.solr.handler.dataimport.DataImportHandler processConfiguration

INFO: Processing configuration from solrconfig.xml: {config=dih-gensigdb-jdbc.xml} Jan 27, 2010 12:27:22 PM org.apache.solr.handler.dataimport.DataImporter loadDataConfig INFO: Data Configuration loaded successfully Jan 27, 2010 12:27:22 PM org.apache.solr.handler.dataimport.DataImporter verifyWithSchema INFO: url is a required field in SolrSchema . But not found in DataConfig

My dataConfig doesnt contain a url field, but i'm not sure why its required. When i use the DIH console and try to debug the config I get the following errors during document import:

org.apache.solr.common.SolrException: Document [null] missing required field: url

My dataConfig looks like this:
<dataConfig> <dataSource name="jdbc" driver="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:xe" user="genesigdb" password="genesigdb"/> <document name="PMID"> <entity name="PMID" dataSource="jdbc" query="SELECT PMID FROM PUBLICATION"> </entity> </document> </dataConfig>

Was it helpful?

Solution

I found what this issue was, in the schema.xml file there is an field called unique key which should correlate with the PK of your entity in the dataConfig.xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top