Re: dataimport handler with mysql: wrong field mapping

2008-12-15 Thread jokkmokk

sorry, I'm using the 1.3.0 release. I've now worked around that issue by
using aliases in the sql statement so that no mapping is needed. This way it
works perfectly.

best regards

Stefan


Shalin Shekhar Mangar wrote:
 
 Which solr version are you using?
 
-- 
View this message in context: 
http://www.nabble.com/dataimport-handler-with-mysql%3A-wrong-field-mapping-tp21013109p21013639.html
Sent from the Solr - User mailing list archive at Nabble.com.



dataimport handler with mysql: wrong field mapping

2008-12-15 Thread jokkmokk

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.