Does "Solr" support a 3-way join? i.e.
http://wiki.apache.org/solr/Join (I have the 2-way join working)

For example, I am pulling 3 different tables from a RDBMS into one Solr core:

   Table#1: Customers     (parent table)
   Table#2: Addresses  (child table with foreign key to customers)
   Table#3: Phones     (child table with foreign key to customers)

with a ONE to MANY relationship between:

        Customers and Addresses
        Customers and Phones

When I pull them into Solr I cannot denormalize the relationships as a
given customers can have many addresses and many phones.

When they come into the my single core (customerInfo), each document
gets a customerInfo_type and a uid corresponding to that type, for
example:

        Customer Document
                customerInfo_type='customer'    
                customer_id

        Address Document
                customerInfo_type='address'     
                fk_address_customer_id

        Phone Document
                customerInfo_type='phone'       
                fk_phone_customer_id

Logically, I need to query in Solr for Customers who:

        - Have an address in a given state
        - Have a phone in a given area code
        - Are a given gender

Syntactically, it would think it would look like:

 - http://localhost:8983/solr/customerInfo/select/?
     q={!join from=fk_address_customer_id to=customer_id}address_State:Maine&
     fq={!join from=customer_id to=fk_phone_customer_id}phone_area_code:212&
     fq=customer_gender:female

But that does not work for me.

Appreciate any thoughts,

Angelyna

Reply via email to