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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:09:54+00:00 2026-06-04T06:09:54+00:00

I need to do a Solr sub-query, which if it was in MySQL would

  • 0

I need to do a Solr sub-query, which if it was in MySQL would look like so:

SELECT *
FROM solr_index
WHERE type = 'person' AND 
city IN (SELECT name FROM solr_index WHERE name = 'London' AND type = 'city')

Apparently Solr Joins are very similar – http://wiki.apache.org/solr/Join. But these are only available in Solr 4 it seems. Is there some way I can do this in Solr 3.X ?

Ideally a way compatible with the ComplexPhraseQueryParser and that the Solr PHP Client or Solarium have support for.

Any help is greatly appreciated.

UPDATE:

Another example which is not location related:

SELECT *
FROM solr_index
WHERE type = 'project' AND 
tag IN (SELECT name FROM solr_index WHERE name = 'Elephant' AND type = 'tag')
  • 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-04T06:09:55+00:00Added an answer on June 4, 2026 at 6:09 am

    joins are there since solr 3.4. Check this out

    http://lucidworks.com/blog/lucene_3_4_0/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a solr query http://localhost:8080/solr/select/?q=A.I need to read the parameter q in my
I need to run a JOIN query on a solr index. I've got two
I need to sort the results I get back from apache solr based on
I need to return only the facet counts from solr. So I basically want
I need to query two index files in solrnet. i will get ids from
I need to customize Solr highlighting prefix and suffix like this: <span class=highlight>text</span> instead
i'm facing a design problem within my project. PROBLEM i need to query solr
I am rather new to SolR. I would like to use multiple tokenizers. I
i need to get this url (http://localhost:8983/solr/select/?q=treen&omitHeader=true) and get the response as xml, and
I need to update my solr documents with detailed informations i can grab from

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.