tests: add nested terms facet on blockChildren under parent terms facet

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1715705 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2015-11-22 21:48:30 +00:00
parent 7bea628bf3
commit 1047e54916
1 changed files with 16 additions and 0 deletions

View File

@ -1213,6 +1213,22 @@ public class TestJsonFacets extends SolrTestCaseHS {
);
// test facet on children nested under terms facet on parents
client.testJQ(params("q", "*:*"
, "json.facet", "{" +
"books:{ type:terms, field:book_s, facet:{ pages:{type:terms, field:v_t, domain:{blockChildren:'type_s:book'}} } }" +
"}"
)
, "facets=={ count:10" +
", books:{buckets:[{val:A,count:1,pages:{buckets:[]}}" +
" ,{val:B,count:1,pages:{buckets:[{val:y,count:3},{val:x,count:2},{val:z,count:2}]}}" +
" ,{val:C,count:1,pages:{buckets:[{val:x,count:1},{val:y,count:1},{val:z,count:1}]}}" +
" ,{val:D,count:1,pages:{buckets:[]}}"+
"] }" +
"}"
);
}