Is it possible to retrieve the common values that were used in a Solr join?
For example, say I have two cores:
1) hospital, fields: id, doctor_id (multiValued), patient_id (multiValued)
2) dental_office, fields: id, dentist_id (multiValued) patient_id (multiValued)
I would like to find all of the patients who go to go to a specific dental_office (id = 2) and see a specific doctor (doctor_id = 123).
Currently my query on the hospital core looks like this:
"q=doctor_id:(123)",
"fq={!join from=patient_id to=patient_id fromIndex=dental_office}id:(2)"
However this returns the hospitals that match the query, but in reality I want to select the hospitals along with which matched patient_ids. Something such as:
hospital docs:
{ id: 1, patient_ids: [234, 56, 8] }
{ id: 8, patient_ids: [8, 45, 89] }
This seems difficult since patient_ids is multiValued. Is there a way to do this?
Thanks!