Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1348

JdbcDataSource does not import Blob values correctly by default

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4
    • 1.4
    • None

    Description

      When blob values are returned through a java ResultSet Object they have the type byte[].
      As byte[] doesn't have a useful toString method we end up with a reference type value added to the solr document (i.e. [B@1f23c5).
      The problem is easy to remedy by adding the attribute 'convertType="true"' to the dataSource tag within data-config.xml.
      However this attribute does not appear to be documented anywhere and I was only able to find it after a few hours digging through the source code.
      A simple fix for this would be to change the default value of convertType to true within the JdbcDataSource class.

      Attachments

        1. BlobTransformer.java
          2 kB
          Luc Caprini
        2. SOLR-1348.patch
          1 kB
          Shalin Shekhar Mangar

        Activity

          People

            shalin Shalin Shekhar Mangar
            jclellan Jay Clelland
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: