Hello, I also played with json.facet, but couldn't achieve the desired result too.
Yonik, Alessandro, Do you think it's a new feature or it can be achieved with the current implementation? On Thu, Nov 19, 2015 at 2:50 PM, xavi jmlucjav <jmluc...@gmail.com> wrote: > Hi, > > I am trying to get some faceting with the json facet api on nested doc, but > I am having issues. Solr 5.3.1. > > This query gest the buckets numbers ok: > > curl http://shost:8983/solr/collection1/query -d 'q=*:*&rows=0& > json.facet={ > yearly-salaries : { > type: terms, > field: salary, > domain: { blockChildren : "parent:true" } > } > } > ' > Salary is a field in child docs only. But if I add another facet outside > it, the inner one returns no data: > > curl http://shost:8983/solr/collection1/query -d 'q=*:*&rows=0& > json.facet={ > department:{ > type: terms, > field: department, > facet:{ > yearly-salaries : { > type: terms, > field: salary, > domain: { blockChildren : "parent:true" } > } > } > } > } > ' > Results in: > > "facets":{ > > "count":3144071, > > "department":{ > > "buckets":[{ > > "val":"Development", > > "count":85707, > > "yearly-salaries":{ > > "buckets":[]}}, > > > department is field only in parent docs. Am I doing something wrong that I > am missing? > thanks > xavi > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics <http://www.griddynamics.com> <mkhlud...@griddynamics.com>