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

  • SEARCH
  • Home
  • 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 8904215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:04:19+00:00 2026-06-15T02:04:19+00:00

Yet another Solr 4 new user. I admired what is Solr able to do

  • 0

Yet another Solr 4 new user. I admired what is Solr able to do in full text searching, but the on-line documentation is a little bit frustrating. Anyway, I’m working on importing my MySQL database (having few millions of records) to Solr.

  • I downloaded the Java connector and save it in the example/lib directory.
  • I created data-config.xml and put within it:

    <document name="doc">
        <entity name="pagey" query="SELECT * FROM page">
    
            <field column="id" name="pid" />
            <field column="Content" name="pcontent" />
            <field column="bid" name="bid" />
            <field column="Num" name="num" />
        </entity>
    </document>
    

    and saved it in: /example/solr/collection1/conf.

  • Linked that file to solrconfig.xml by adding:

    <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
    <lst name="defaults">
    <str name="config">data-config.xml</str>
    </lst>
    </requestHandler>

  • Modified schema.xml to add my new fields.

But when I arrived to perform full importing by interring: http://[localhost]:8983/solr/dataimport?command=full-import I got this error: HTTP ERROR 404 Problem accessing /solr/dataimport. Reason: Not Found. I think this is no more valid in the last version 4. So I tried: http://[localhost]:8983/solr/#/collection1/dataimport?command=full-import but nothing happens.

My fields have been successfully added, I can see them on the admin panel in the schema browser section in collection1.

From the admin -> collection1 -> Dataimport, it show: sorry, no dataimport-handler defined!.
Running the start.jar doesn’t show errors.

What am I missing right here?

EDIT: After solving it, remember that “XML is case-sensitive”.

  • 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-15T02:04:20+00:00Added an answer on June 15, 2026 at 2:04 am

    You data-config needs to look more like this. You are not specifying a mysql host, user, or password.

    <dataConfig>
        <dataSource type="JdbcDataSource"
       driver="com.mysql.jdbc.Driver"
       url="jdbc:mysql://127.0.0.1:8889/yourdatabase"
       user="mysql_user"
       password="mysql_password"/>
    
    <document name="doc">
        <entity name="pagey" query="SELECT * FROM page">
    
            <field column="id" name="pid" />
            <field column="Content" name="pcontent" />
            <field column="bid" name="bid" />
            <field column="Num" name="num" />
        </entity>
    </document>
    </dataConfig>
    

    You need to include this in your solrconfig.xml file.

    <lib dir="../../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
    

    and

      <requestHandler name="/dataimport"
         class="org.apache.solr.handler.dataimport.DataImportHandler">
        <lst name="defaults">
          <str name="config">data-config.xml</str>
        </lst>
      </requestHandler> 
    

    In solr.xml you need to make sure you have the following

    <solr persistent="true" sharedLib="../lib">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry but yet another question on JavaScript. From my previous post, I was able
I was handling yet another KeyDown event in a user control when I wondered
I'm trying to produce yet another lightbox as much needed HTML/CSS/Javascript practice, but I've
Yet another SVN guideline question, I know. I recently joined a new company which
Yet another IE is doing something different from other browsers question but this is
I'm sorry for yet another of these posts, but from what I can tell,
Yet another slow emulator! thread, but not quite. Ussualy people are complaining about boot
I've got yet another deployment problem. What I have: little Windows Forms application that
Yet another question about classes as Im new to OOP. I am creating a
Sorry for yet another question about EF4 context lifespan, but I've been wondering about

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.