Yuti-G commented on a change in pull request #747:
URL: https://github.com/apache/lucene/pull/747#discussion_r826461610



##########
File path: 
lucene/facet/src/test/org/apache/lucene/facet/sortedset/TestSortedSetDocValuesFacets.java
##########
@@ -104,6 +104,65 @@ public void testBasic() throws Exception {
               "dim=b path=[] value=2 childCount=2\n  buzz (2)\n  baz (1)\n",
               facets.getTopChildren(10, "b").toString());
 
+          // test getAllDims
+          List<FacetResult> results = facets.getAllDims(10);
+          assertEquals(2, results.size());
+          assertEquals(
+              "dim=b path=[] value=2 childCount=2\n  buzz (2)\n  baz (1)\n",
+              results.get(0).toString());
+          assertEquals(
+              "dim=a path=[] value=-1 childCount=3\n  foo (2)\n  bar (1)\n  
zoo (1)\n",
+              results.get(1).toString());
+
+          // test getAllDims(1, 0) with topN = 0
+          expectThrows(

Review comment:
       Sure! I will create a Jira and resolve it. getAllDims(0) does throw 
`IllegalArgumentException` in TaxonomyFacetCounts because `getTopChildren(0, 
dim)` throws it, but the overridden implementation in SSDV does not specify it. 
I was not sure if the two implementations should behave the same on this 
exception. Thank you so much for confirming this!
   
   The javadoc of this test has a typo, should be `// test getAllDims(0) with 
topN = 0`, will fix this as well.




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to