gautamworah96 commented on a change in pull request #131:
URL: https://github.com/apache/lucene/pull/131#discussion_r634572219



##########
File path: 
lucene/facet/src/test/org/apache/lucene/facet/TestLongValueFacetCounts.java
##########
@@ -429,15 +429,15 @@ public void testRandomMultiValued() throws Exception {
       int expectedChildCount = 0;
       int expectedTotalCount = 0;
       for (int i = 0; i < valueCount; i++) {
-        if (values[i] != null) {
+        if (values[i] != null && values[i].length > 0) {

Review comment:
       > I think if a single document contains the same numeric value more than 
once, indexed as a SortedNumericDocValuesField, Lucene will indeed index that 
number multiple times for that document, and then this facet counting 
implementation will count it multiple times for that one value, right?
   
   Correct @mikemccand . I thought that this PR was for fixing that bug. I have 
replicated that bug 
[here](https://github.com/gautamworah96/lucene/commit/042878117308f76629a27b0bcf83e25f074dc8b1)
 (see testLongValues)
   
   So essentially, within a FacetResult you would want the `value` count for 
the `label` to be counted just once but that is not the case today
   
   I'll create a JIRA for it




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

Reply via email to