I have the same problem and I solved it using the subquery result transformer 
e.g.
fl=*, mychild:[subquery]

query params as follows:
mychild.q= {!terms v=$row.instanceid f=instanceid}&mychild.fq=(contenttype:blah 
AND quantity:5)

From: Jonathan Bridges<mailto:jondbrid...@gmail.com>
Sent: Tuesday, May 4, 2021 6:30 PM
To: users@solr.apache.org<mailto:users@solr.apache.org>
Subject: Solr 8.8.2 childFilter multiple conditions

Hello,

With Solr 8.8.2 I am unable to provide more than one filter in the fl
"childFilter" param.

For example,

fq={!parent which='docType:parent_doc_type'} docType: child_doc_type AND
color: Red AND size: Large

This fq will filter all parent documents which have child documents that
are 'Red' and 'Large'.

Now I want to show the parents with the children in the result, but only
the children which are 'Red' and 'Large'. In the past (Solr v6) I would
accomplish this with:

fl=*, [child childFilter='docType:child_doc_type AND color: Red AND size:
Large']
However, with Solr 8.8.2 I get no children in the results and no errors.

If I remove the extra AND conditions:

fl=*, [child childFilter='docType:child_doc_type']
I then get all child documents, even ones which are Blue and Small.

How can I include only child documents which match the fq? Is there some
way to specify multiple conditions now that I just can't find in the docs?

Thanks for any help.

Reply via email to