You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Jay Clelland (JIRA)" <ji...@apache.org> on 2009/08/07 22:19:14 UTC

[jira] Created: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

JdbcDataSource does not import Blob values correctly by default
---------------------------------------------------------------

                 Key: SOLR-1348
                 URL: https://issues.apache.org/jira/browse/SOLR-1348
             Project: Solr
          Issue Type: Bug
    Affects Versions: 1.4
            Reporter: Jay Clelland


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. 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Avlesh Singh (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741050#action_12741050 ] 

Avlesh Singh commented on SOLR-1348:
------------------------------------

I have used "cast()" function in MySQL to convert my blob columns in the result set to strings.

> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Assignee: Noble Paul
>            Priority: Minor
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Luc Caprini (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Luc Caprini updated SOLR-1348:
------------------------------

    Attachment: BlobTransformer.java

Tested with Solr1.4, this BLOB Transformer i wrote works fine ... 
simply in your datasource use the following syntax :

<entity name="a"   transformer="BlobTransformer" ... >
<field column="colname"  blob="true" />
</entity>

 


> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: BlobTransformer.java, SOLR-1348.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul reassigned SOLR-1348:
--------------------------------

    Assignee: Noble Paul

> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Assignee: Noble Paul
>            Priority: Minor
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Noble Paul (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12740877#action_12740877 ] 

Noble Paul commented on SOLR-1348:
----------------------------------

bq.A simple fix for this would be to change the default value of convertType to true within the JdbcDataSource class

this was kept false deliberately. Users should not get any kind of nasty surprise when they write a Transformer and moreover it can break back compat . I guess it should be documented properly. 

How about a Transformer?



> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Priority: Minor
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Jay Clelland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Clelland updated SOLR-1348:
-------------------------------

    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. 

  was:
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. 
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. 


> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Priority: Minor
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-1348:
----------------------------------------

    Attachment: SOLR-1348.patch

This patch adds support for the binary field type in converType logic. I'll commit this shortly.

I've also added the suggested solutions to this problem on the DIH Faq page:

http://wiki.apache.org/solr/DataImportHandlerFaq#head-149779b72761ab071c841879545256bdbbdc15d2

> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Assignee: Noble Paul
>            Priority: Minor
>         Attachments: SOLR-1348.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Jay Clelland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Clelland updated SOLR-1348:
-------------------------------

    Component/s: contrib - DataImportHandler
       Priority: Minor  (was: Major)

> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Priority: Minor
>
> 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. 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12760531#action_12760531 ] 

Shalin Shekhar Mangar commented on SOLR-1348:
---------------------------------------------

Hey thanks Luc. Can you please open a new issue and attach the patch there? We're not taking any new features for Solr 1.4 but we can commit this for 1.5

> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: BlobTransformer.java, SOLR-1348.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar resolved SOLR-1348.
-----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4
         Assignee: Shalin Shekhar Mangar  (was: Noble Paul)

Committed revision 812045.

> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Assignee: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 1.4
>
>         Attachments: SOLR-1348.patch
>
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-1348) JdbcDataSource does not import Blob values correctly by default

Posted by "Jay Clelland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-1348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jay Clelland updated SOLR-1348:
-------------------------------

    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. 
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. 

  was: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. 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. 


> JdbcDataSource does not import Blob values correctly by default
> ---------------------------------------------------------------
>
>                 Key: SOLR-1348
>                 URL: https://issues.apache.org/jira/browse/SOLR-1348
>             Project: Solr
>          Issue Type: Bug
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Jay Clelland
>            Priority: Minor
>
> 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. 
> 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. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.