1

I'm having issues figuring out exactly how to import blob data from a SQL Server database into SOLR. This is hooked into NAV as well. I've managed to get the data out of the table within NAV, however I need this data in SOLR for search purposes.

Here's my current dataConfig file.

<dataConfig>
    <dataSource name="dastream" type="FieldStreamDataSource" />
    <dataSource name="db" driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost;databaseName=TestingDB" user="sa" password="*******" />
    <document name="items">
        <entity name="item"  query="select [No_], [Desc_ English] as desceng from [Foo$Item]" dataSource="db">
            <field column="No_" name="id" />

            <entity processor="TikaEntityProcessor" url="desceng" dataField="item.desceng" name="blob" dataSource="dastream" format="text" >
                <field column="text" name="desceng"  />
            </entity>
        </entity>

    </document>

</dataConfig>

The error I keep getting is:


Full Import failed:java.lang.RuntimeException: java.lang.RuntimeException: org.apache.solr.handler.dataimport.DataImportHandlerException: java.lang.RuntimeException: unsupported type : class java.lang.String


I'm not sure what I'm missing.

Xyphius
  • 89
  • 1
  • 7

1 Answers1

1

Maybe this is because Nav stores blobs in his own way. See this question. There ia an example how to extract data using python.

Mak Sim
  • 2,148
  • 19
  • 30
  • I've attempted to use the theories in question to create a transformer for the entity I want to deflate. Java seems to have issues when it comes to the deflation on that aspect. – Xyphius Jun 19 '17 at 19:50
  • 1
    Well. All options are there. If this doesn't work then you can write a function in Nav to export required blob to file and get file name through web service after this. – Mak Sim Jun 20 '17 at 04:26
  • Appreciate the help. After much muddling, I managed to get the Transformer to work. Thanks! – Xyphius Jun 20 '17 at 13:00