From 1047e549168d82c882dc76f83a9b520428f8b27b Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Sun, 22 Nov 2015 21:48:30 +0000 Subject: [PATCH] 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 --- .../apache/solr/search/facet/TestJsonFacets.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java index 63d6ce963b7..f7bcbc1e75a 100644 --- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java +++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java @@ -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:[]}}"+ + "] }" + + "}" + ); + + }