Walter, :: Fields can be multi-valued. Put multiple phone numbers in a field and match all of them.
Thank you for the suggestion, unfortunately I oversimplified my example =( Let me try again: I should have said that I need to match on 2 fields (as a set) from within a given child table. Logically, I need to query in Solr for Customers who: - Have an address in a given state (e.g. NY) and that address is of a given type (e.g. condo) - Have a phone in a given area code (e.g. 212) and of a given brand (e.g. Nokia) - Are a given gender (e.g. male) Respectfully, Angelyna On Sat, Mar 10, 2012 at 7:58 PM, Angelina Bola <angelyna.b...@gmail.com> wrote: > 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