Hello,

We're on Solr 6.2.1 and have a requirement where we need to facet on nested
docs. So far we'd been using two pass query approach, where the first query
searches within the parent domain and gets all the matching nested doc ids
as facets (parent docs keep track of nested docs they contain) and then a
second query at the nested doc level that includes the ids of all the
matching nested docs as boolean clauses found by query 1. We then go back
and correct the facet count for query 1. But with this approach we've been
hitting the maxBooleanClauses limit regularly and with the amount of data
we're seeing in this area, this approach is just not sustainable.

The answer seems to be JSON faceting with blockChildren. The problem with
this approach, at least in 6.2.1, is that filter clause is not supported
within the facet domain. blockChildren matches all children of every parent
doc matched in the query but in reality I only want a subset of the
children - only the ones that match some criteria. Is there a way to filter
out children without the need for the filter clause and without having to
move to Solr 6.4?

Reference:
http://yonik.com/solr-nested-objects/#faceting

Thanks,
Srijan

Reply via email to