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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T07:18:47+00:00 2026-06-14T07:18:47+00:00

I am trying to import multiple tables from a MySQL database using Solr’s Data

  • 0

I am trying to import multiple tables from a MySQL database using Solr’s Data Import Handler (DIH). The DIH does not import data from the second table, ‘detail’.

My database configuration file is

<document>
    <entity name="item" pk="ListingId" query="SELECT * FROM item as item where listingid=360245270">
        <entity name="detail" pk="ListingId" query="SELECT Body FROM detail where listingid='${item.listingid}'">
            <field column="Body" name="Body" />
        </entity>
     </entity>
</document>

I monitored the MySQL query log, and the two important queries that are executed are:

SELECT * FROM item as item where listingid=360245270

SELECT Body FROM listeditemdetail where listeditemdetail.listingid=''

Clearly, the ‘${item.listingid}’ part in the configuration file is not working as required. I have tried different spellings for the table and column names but cannot get it to work.

  • 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-14T07:18:48+00:00Added an answer on June 14, 2026 at 7:18 am

    (Just a Try) Try removing the primary key and using the upper case e.g. :-

    <document name="items">
        <entity name="item" query="SELECT * FROM item as item where listingid=360245270">
            <field column="LISTINGID" name="listingid" />
            <entity name="detail" query="SELECT Body FROM detail where listingid='${item.LISTINGID}'">
                <field column="Body" name="Body" />
            </entity>
        </entity>
    </document>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to index data across multiple tables using Solr's Data Import Handler.
I'm trying to import a CSV files into my MySQL table using the following
I am trying to read data from multiple Kinect sensors (3 at the moment)
I am trying to import data from a saved MATLAB struct array, but it
I'm trying to implement some code to import user's data from another service via
I have a mysql table which holds lots of data across multiple tables. So
I am trying to import data from Access to Excel based on two parameters.
Hi I am trying to import multiple xsl files from a specific folder to
im trying to import html table data to an excel file and have succeeded
I'm currently trying to import about 10000 rows (from a CSV file) into an

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.