Just solved the problem by changing blockChildren:"content_type:children" to blockParent:"content_type:children". Does Solrj support json faceting as well?
Yangrui On Mon, Nov 9, 2015 at 2:39 PM, Yangrui Guo <guoyang...@gmail.com> wrote: > Hello > > I followed Yonik's blog regarding faceting on child document and my curl > command is posted below: > > curl http://localhost:8983/solr/movie_shard1_replica1/query -d ' > q={!parent which="content_type:parent"}+movie& > json.facet={ > movies:{ > type:terms, > field:actor, > domain:{blockChildren:"content_type:children"} > } > }' > > But I got an empty list of buckets from the response. The count number was > equivalent to number of parent docs. Is there anything wrong with my query? > > "facets":{ > "count":2412762, > "movies":{ > "buckets":[]}}} > > Yangrui Guo >