Hi,
It appears this was broken in 8.0 by
https://issues.apache.org/jira/browse/SOLR-12768
And then fixed in 9.0 (not released) by SOLR-15156
I didn't back-port the fix because I thought users might be relying on the
escaping behavior. I didn't realize such escaping didn't exist before
SOLR-12768. In light of this, the change would make an appropriate
addition to 8.9 but not a bug-fix version.
A work-around is to express your query without colons, since the internal
logic is gated on that. So something like:
childFilter='+{!field f=docType v=child_doc_type} +{!field f=color
v=Red}' etc. Disclaimer: I didn't test that; it *may* be necessary
to move out some of this into other parameters based on parsing
rules/restrictions e.g. childFilter=$theChildFilter and then add a
top-level param. But I think it's not needed.
~ David Smiley
Apache Lucene/Solr Search Developer
http://www.linkedin.com/in/davidwsmiley
On Tue, May 4, 2021 at 6:30 PM Jonathan Bridges <[email protected]>
wrote:
> 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.
>