lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [24/50] lucene-solr:jira/solr-11285: LUCENE-7927: re-enable the low value optimization
Date Wed, 06 Sep 2017 13:47:07 GMT
LUCENE-7927: re-enable the low value optimization


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/aa5dac04
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/aa5dac04
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/aa5dac04

Branch: refs/heads/jira/solr-11285
Commit: aa5dac04bdb5f49b75b95763e9b08065c47b8e52
Parents: aa7394d
Author: Mike McCandless <mikemccand@apache.org>
Authored: Thu Aug 31 06:03:25 2017 -0400
Committer: Mike McCandless <mikemccand@apache.org>
Committed: Thu Aug 31 06:03:25 2017 -0400

----------------------------------------------------------------------
 .../java/org/apache/lucene/facet/LongValueFacetCounts.java    | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/aa5dac04/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java
----------------------------------------------------------------------
diff --git a/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java b/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java
index 3f7dbf4..7d7a32b 100644
--- a/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java
+++ b/lucene/facet/src/java/org/apache/lucene/facet/LongValueFacetCounts.java
@@ -250,14 +250,11 @@ public class LongValueFacetCounts extends Facets {
   }
 
   private void increment(long value) {
-    /*
     if (value >= 0 && value < counts.length) {
       counts[(int) value]++;
     } else {
       hashCounts.add(value, 1);
     }
-    */
-    hashCounts.add(value, 1);
   }
 
   @Override
@@ -365,22 +362,18 @@ public class LongValueFacetCounts extends Facets {
 
     boolean countsAdded = false;
     for (int i = 0; i < upto; i++) {
-      /*
       if (countsAdded == false && hashCounts.values[i] >= counts.length) {
         countsAdded = true;
         appendCounts(labelValues);
       }
-      */
 
       labelValues.add(new LabelAndValue(Long.toString(hashCounts.values[i]),
                                         hashCounts.counts[i]));
     }
 
-    /*
     if (countsAdded == false) {
       appendCounts(labelValues);
     }
-    */
 
     return new FacetResult(field, new String[0], totCount, labelValues.toArray(new LabelAndValue[0]),
labelValues.size());
   }


Mime
View raw message