Skip to content
Advertisement

Using inner Join in Solr query

In SQL, I have the query like this

SELECT * 
FROM table1 INNER JOIN table2 ON 
     table1.table1To2Id = table2.table2Id INNER JOIN 
     table3 ON table1.table1To3Id = table3.table3Id

How can I make the same query using Solr? Given that the field in SQL is the same field in Solr
Thank in advance

Advertisement

Answer

I believe you are looking for something like this:

SQL:

Solr (split to multiple lines for readabilty):

The key is to pass in the next join query after : instead of passing the value. For more information refer to this

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement