private final static BigSegmentedArray newInstance(TermCountSize termCountSize, int maxDoc) {
if (termCountSize == TermCountSize.small) {
return new BigByteArray(maxDoc);
} else if (termCountSize == TermCountSize.medium) {
return new BigShortArray(maxDoc);
} else
return new BigIntArray(maxDoc);
}