lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xavi jmlucjav <jmluc...@gmail.com>
Subject Json Facet api on nested doc
Date Thu, 19 Nov 2015 11:50:15 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message