gautamworah96 commented on a change in pull request #191: URL: https://github.com/apache/lucene/pull/191#discussion_r661699546
########## File path: lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java ########## @@ -556,23 +544,37 @@ public void testRandomMultiValued() throws Exception { return cmp; }); if (random().nextBoolean()) { - topN = valueCount; + topN = docCount; } else { - topN = random().nextInt(valueCount); + topN = random().nextInt(docCount); } actual = facetCounts.getTopChildrenSortByCount(topN); assertSame( "id " + minId + "-" + maxId + ", sort facets by count", expectedCounts, expectedChildCount, - totCount, + expectedTotalCount, actual, topN); } r.close(); dir.close(); } + private void setExpectedFrequencies(long[] values, Map<Long, Integer> expected) { Review comment: +1 on the idea. However in this scenario, we do need to populate an existing map. The map that was populated by the previous `values[i]` value has to be reused and modified. -- 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