use of org.apache.lucene.util.LongValues in project lucene-solr by apache.
the class BlockJoinFieldFacetAccumulator method migrateGlobal.
/** folds counts in segment ordinal space (segCounts) into global ordinal space (counts)
* copy paste-from {@link DocValuesFacets#migrateGlobal(int[], int[], int, OrdinalMap)}*/
void migrateGlobal(int[] counts, long[] segCounts, int subIndex, OrdinalMap map) {
final LongValues ordMap = map.getGlobalOrds(subIndex);
// missing count
counts[0] += (int) (segCounts[0] >> 32);
// migrate actual ordinals
for (int ord = 1; ord <= segmentSSDV.getValueCount(); ord++) {
int count = (int) (segCounts[ord] >> 32);
if (count != 0) {
counts[1 + (int) ordMap.get(ord - 1)] += count;
}
}
}
Aggregations