Hello, Srijan. It's hard to grasp the problem without particular query and expected/actual results. On top of my head, it's possible to refine children by nesting query facet instruction <https://lucene.apache.org/solr/guide/7_2/json-facet-api.html#QueryFacet> under blockChildren one.
On Tue, Jun 18, 2019 at 11:51 PM Srijan <shree...@gmail.com> wrote: > 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 > -- Sincerely yours Mikhail Khludnev