lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jokkmokk <jokkm...@gmx.at>
Subject dataimport handler with mysql: wrong field mapping
Date Mon, 15 Dec 2008 12:34:11 GMT

HI,

I'm desperately trying to get the dataimport handler to work, however it
seems that it just ignores the field name mapping.
I have the fields "body" and "subject" in the database and those are called
"title" and "content" in the solr schema, so I use the following import
config:

<dataConfig>

<dataSource
    type="JdbcDataSource"
    driver="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost/mydb"
    user="root"
    password=""/>


<document>
    <entity name="phorum_messages" query="select * from phorum_messages">
        <field column="body" name="content"/>
        <field column="subject" name="title"/>
    </entity>
</document>

</dataConfig>

however I always get the following exception:

org.apache.solr.common.SolrException: ERROR:unknown field 'body'
        at
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:274)
        at
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:59)
        at
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:69)
        at
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:279)
        at
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:317)
        at
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:179)
        at
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:137)
        at
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:326)
        at
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:386)
        at
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:367)


but according to the documentation it should add a document with "title" and
"content" not "body" and "subject"?!

I'd appreciate any help as I can't see anything wrong with my
configuration...

TIA,

Stefan
-- 
View this message in context: http://www.nabble.com/dataimport-handler-with-mysql%3A-wrong-field-mapping-tp21013109p21013109.html
Sent from the Solr - User mailing list archive at Nabble.com.


Mime
View raw message