Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8685521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:35:47+00:00 2026-06-12T22:35:47+00:00

I have Solr 4.0 up and running and using DataImportHandler to import data from

  • 0

I have Solr 4.0 up and running and using DataImportHandler to import data from MySQL.

I have notcied that if I point DataImportHandler at MySQL 5.5 data source everyhting works as expected. However when using exactly the same Solr/DataImportHandler config and exactly the same database but running on MySQL 5.0 certain fields come back base64 encoded.

Relevant entries in data-config.xml

       <dataSource type="JdbcDataSource" 
                    driver="com.mysql.jdbc.Driver" 
                    name="DB-SOURCE"
                    url="jdbc:mysql://dbhost/dbname"
                    user="user"    
                    password="password"
    />

   <document name="articles">
<entity name="article_ph" transformer="HTMLStripTransformer" dataSource="DB-SOURCE" pk="article_id" 
                            query="SELECT 'Politics Home' AS article_site, 
                                            CONCAT('ph-article-', article_id) AS article_id,
                                            article_title,
                                            article_text_plain AS article_content,
                                            article_articletype_id,
                                            article_datetime AS article_date,
                                            'Uncategorised' AS article_section,
                                            'Non Member' AS article_source
                                            FROM articles 
                                            WHERE 
                                            article_datetime!='0000-00-00 00:00:00' 
                                            AND article_datetime is NOT NULL 
                                            AND article_live=1 
                                            AND article_text_plain!='' 
                                            AND article_text_plain IS NOT NULL 
                                            AND article_title is NOT NULL
                                            AND article_title !=''">
            <field column="ARTICLE_SITE" name="article_site" />
            <field column="ARTICLE_ID" name="article_id" />
            <field column="ARTICLE_TITLE" name="article_title" />
            <field column="ARTICLE_CONTENT" name="article_content" stripHTML="true" />
            <field column="ARTICLE_DATE" name="article_date" />
            <field column="ARTICLE_SECTION" name="article_section" />
            <field column="ARTICLE_SOURCE" name="article_source" />
            <entity name="articletype_name" dataSource="DB-SOURCE" 
                            query="SELECT 
                            articletype_name 
                            FROM articletypes 
                            WHERE articletype_id='${article_ph.article_articletype_id}'">
    <field column="articletype_name" name="article_type"/>
            </entity>
</entity>

When I run import pointing at MySQL 5.5 I get :

<arr name="article_id"><str>ph-article-124</str></arr>

When I run import pointing at MySQL 5.0 I get articles with base64 encode IDs :

<arr name="article_id"><str>cGgtYXJ0aWNsZS0xMjQ=</str></arr>

All other fields come back correctly.

Collation and character sets on both DBs are the same.

Any help appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:35:49+00:00Added an answer on June 12, 2026 at 10:35 pm

    Try converting it back to string

    CONCAT('ph-article-', CAST(article_id AS CHAR(50))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a script that gets data from solr for which date is
I am running Solr on my windows machine using jetty. I have downloaded the
I'm trying to index data from a database in Solr using the DIH. So
On my development system I have a Solr server running that is queried by
ok, I'm totally new to SOLR and Lucene, but have got Solr running out-of-the-box
I have followed this guide to install Solr in TomCat running on Windows Server
I have a SOLR index over several million full text documents. This works very
I have a Solr MoreLikeThis query that is producing some decidedly non-related results. When
I have been using solr search and now I am adding pagination via the
I have installed a servlet (solr) that requires that I set the variable solr.solr.home

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.