mikemccand commented on a change in pull request #191: URL: https://github.com/apache/lucene/pull/191#discussion_r656099284
########## File path: lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java ########## @@ -162,8 +164,14 @@ private void count(String field, List<MatchingDocs> matchingDocs) throws IOExcep if (limit > 0) { totCount++; } + Set<Long> uniqueLongValues = + new HashSet<>(); // count each repeated long value in a field as the same Review comment: Hmm, could we use a native HPPC set instead? Also, it makes me nervous to allocate a new `Set` for every hit. Could we reuse a single `Set`? ########## File path: lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java ########## @@ -382,19 +383,19 @@ public void testRandomMultiValued() throws Exception { + allSingleValued); } - long[][] values = new long[valueCount][]; - for (int i = 0; i < valueCount; i++) { + Long[][] values = new Long[docCount][]; Review comment: Hmm, why switch to boxed `Long` here? -- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org