mkhludnev commented on a change in pull request #1161: SOLR-12325 Added uniqueBlockQuery(parent:true) aggregation for JSON Facet URL: https://github.com/apache/lucene-solr/pull/1161#discussion_r365842780
########## File path: solr/core/src/test/org/apache/solr/search/facet/TestJsonFacetsWithNestedObjects.java ########## @@ -360,4 +360,30 @@ public void testUniqueBlock() throws Exception { "}" ); } + + public void testUniqueBlockQuery() throws Exception { + final Client client = Client.localClient(); + ModifiableSolrParams p = params("rows","0"); + client.testJQ(params(p, "q", "{!parent tag=top which=type_s:book v=$childquery}" + , "childquery", "comment_t:*" + , "fl", "id", "fl" , "title_t" + , "json.facet", "{" + + " types: {" + + " domain: { blockChildren:\"type_s:book\"" + + " }," + + " type:terms," + + " field:type_s," + + " limit:-1," + + " facet: {" + + " in_books: \"uniqueBlockQuery(type_s:book)\" }" + + " }" + + "}" ) + + , "response=={numFound:2,start:0,docs:[]}" + , "facets=={ count:2," + + "types:{" + + " buckets:[ {val:review, count:5, in_books:2} ]}" + Review comment: This kind of smoke test is fine. I;m a little bit anxious from the code overall. Can you think about bigger scale random test making side by side comparison? Thanks. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org