LUCENE-7927: re-enable the low value optimization

This commit is contained in:
Mike McCandless 2017-08-31 06:03:25 -04:00
parent aa7394d27f
commit aa5dac04bd
1 changed files with 0 additions and 7 deletions

View File

@ -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());
}