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 8110095
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T01:38:09+00:00 2026-06-06T01:38:09+00:00

We are trying to build a SOLR index with data coming from 2 different

  • 0

We are trying to build a SOLR index with data coming from 2 different databases,

Looking at that http://wiki.apache.org/solr/DataImportHandler#Multiple_DataSources, it seems it should be possible but we are having issues.

 <dataConfig>
  <dataSource 
    name="ds-1"
    type="JdbcDataSource" 
    driver="Driver"
    url="jdbc_url1" 
    user="user1" 
    password="pass1"/>

<dataSource
    name="ds-2"
    type="JdbcDataSource" 
    driver="Driver"
    url="jdbc_url2" 
    user="user2" 
    password="pass2"/>

   <document>

 <entity name="entity1" datasource="ds-1" query="SELECT YYY  FROM TABLE">
      <field column="YYY" name="YYY"/>
    </entity>

 <entity name="entity2" datasource="ds-2" query="SELECT ZZZ FROM TABLE">
      <field column="ZZZ" name="ZZZ"/>
    </entity>

  </document>
</dataConfig>

When trying to run the indexer, it works for the first entity/query/ds and then fail with org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT ZZZ FROM TABLE

It seems it’s trying to execute query2 on the ds-1…

We also played changing the order of the datasources and/or entity definition, and it seems it can always only index the first one.

Are we doing something wrong? do we have wrong expectation of what SOLR can do?

Thanks for the help

  • 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-06T01:38:10+00:00Added an answer on June 6, 2026 at 1:38 am

    I believe your problem is just a case issue. datasource should be dataSource, as I recall Solr XML configuration attributes are case-sensitive. With the current configuration, dataSource would not be actually defined, so the handler will use the first data source that has been defined (single data source mode).

    You should change it to:

    <entity name="entity1" dataSource="ds-1" query="SELECT YYY FROM TABLE">
      <field column="YYY" name="YYY"/>
    </entity>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I implemented Solr SpellCheck Component based on the document from http://wiki.apache.org/solr/SpellCheckComponent , it works
I have a std::vector< tr1::shared_ptr<mapObject> > that I'm trying build from data contained in
I'm trying to build auto suggest functionality using Solr. The index contains different locations
I'm trying to integrate Haystack with Solr. When I try to build the index,
I'm trying build a method which returns the shortest path from one node to
I'm trying to build a control logic that depends on the current gsp page
I am trying to find a way to build a full-text index stored in-memory
I am trying to build an auto complete using Solr (TermsComponent) and Rails. Now
Trying to build dynamic output from json and using jq/template tmpl display rows/columns. Somehow
I'm trying build a regex that will replace any characters not of the format:

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.