Dear SOLR users,

I want to use streaming expression innerJoin using a multi-valued field to do 
the join by equality, that is having any child documents  (of type "child") and
one parent document (of type "parent") join these according to equality of id_s 
and children_ids

Parent
* id_s = "p123"
* type_s = "parent"
* children_ids_ss = "c1,c2"

Child
* id_s = "c1"
* type_s = "child"

Child
* id_s = "c2"
* type_s = "child"

innerJoin(
   search(collection,q="type_s:child",fl="id_s",sort="id_s ASC"),
   search(collection,q="type_s:parent",fl="id_s,children_ids_ss",sort="id_s 
ASC"),
   on="id_s=children_ids_ss"
)

This seems to be impossible, I am getting the following exception 
"java.util.ArrayList cannot be cast to java.lang.Comparable". Using a 
GraphQuery with from and to
this relationship traversal along multi-valued fields worked (however not 
between shards, this is why I switched to streaming expressions).

Is there any mechanism to flatten the tuples with the multi-valued field into 
new tuples with single-valued fields to get the join working ? Or any other 
tweak.

Note: The relationship between Parent and Child is many-to-many, thus moving 
the foreign-keys to the children as single-valued fields is not possible.

The issue is related tot he following issue: 
http://lucene.472066.n3.nabble.com/Using-multi-valued-field-in-solr-cloud-Graph-Traversal-Query-td4324379.html

Thanks a lot in advance for any assistance,
Marc


Dr. Marc Röttig
Software Developer
EMail: marc.roet...@vico-research.com
Telefon: +49(0)711. 78 78 29-290
Fax +49(0)711. 78 78 29-10

VICO Research & Consulting GmbH
Friedrich-List-Strasse 46 / 70771 Leinfelden-Echterdingen

Homepage:         www.vico-research.com/
Blog:                       www.vico-research.com/expert-talk
Twitter:                 www.twitter.com/vico_news
Facebook:            www.facebook.com/vico.friend
Sitz der Gesellschaft: Leinfelden-Echterdingen
Amtsgericht Stuttgart, HRB 720896
Geschäftsführer: Marc Trömel

Reply via email to