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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:27:09+00:00 2026-05-14T07:27:09+00:00

I need to run a JOIN query on a solr index. I’ve got two

  • 0

I need to run a JOIN query on a solr index. I’ve got two xmls that I have indexed, person.xml and subject.xml.

Person:

<doc>
<field name="id">P39126</field>
<field name="family">Smith</field>
<field name="given">John</field>
<field name="subject">S1276</field>
<field name="subject">S1312</field>
</doc>

Subject:

<doc>
<field name="id">S1276</field>
<field name="topic">Abnormalities, Human</field>
</doc>

I need to only display information from the person doc but each query should match fields in both person and subject. In the case the query matches only the subject doc I need to display all docs from the person that have a matching id. Is this possible to do without running two seperate queries? Something like a JOIN query would do the job.

Any 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-05-14T07:27:10+00:00Added an answer on May 14, 2026 at 7:27 am

    I do not think it is possible to do what you are asking with a single query using your schema.

    One thing that you should keep in mind is to always think of Solr indexes as single denormalized tables. This is sometimes a challenge and there may be times where you must be forced to use different indexes for each kind of data.

    For your problem, maybe having a schema like this one might help:

    <doc>
     <field name="id">P39126</field>
     <field name="family">Smith</field>
     <field name="given">John</field>
     <field name="topic">Abnormalities, Human</field> <!-- subject S1276 -->
     <field name="topic">some, other, topics</field> <!-- subject S1312 -->
    </doc>
    

    Running a query for some topics with this schema would return all person having those topics.

    Some links that might interest you:

    • http://www.lucidimagination.com/search/document/93e8b09e90b0076c/help_with_denormalizing_issues#60890dcb99a3004d
    • http://wiki.apache.org/solr/SchemaDesign
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table A with this column: IDS(VARCHAR) 1|56|23 I need to run
I need some performance improvement guidance, my query takes several seconds to run and
Background: I have a performance-critical query I'd like to run and I don't care
I need to have a subquery order a table before joining so that when
When I run this code the page repeats its self. I also need it
I have a query of the form: select m.id from mytable m left outer
Just briefly, I have run into a dreaded 2(n) queries problem. If n =
I've built a complex query for my access database and in access it works
I need to retrieve some data from a remote database, it is a kind
SELECT count(*) c FROM full_view WHERE verified > ( DATE (NOW()) - INTERVAL 30

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.