SOLR DIH throwing error “unsupported type : class

2019-08-28 21:11发布

问题:

I'm trying to import a MS SQL field containing a PDF BLOB into SOLR and getting the following error:

Exception while processing: attachment document : SolrInputDocument(fields: []):org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.RuntimeException: unsupported type : class java.lang.String at org.apache.solr.handler.dataimport.DataImportHandlerException.wrapAndThrow(DataImportHandlerException.java:63) at org.apache.solr.handler.dataimport.EntityProcessorWrapper.nextRow(EntityProcessorWrapper.java:246) at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:476) at org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:415) at org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:330) at org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:232) at org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:416) at org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:480) at org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:461) Caused by: java.lang.RuntimeException: unsupported type : class java.lang.String

Here is the relevant part of my dataimport file:

<entity 
 name="attachment" 
 dataSource="dastream"
 processor="TikaEntityProcessor"
 dataField="items.CONTENTDATAFILE"
 format="text"
 <field column="content" name="body" />
 </entity>

Anyone have any idea whats wrong? SOLR version is 4.10.3

回答1:

The field, CONTENTDATAFILE, is probably null for the entity in question...



标签: solr