bagIndex.setHomedir(new File(subDbServiceHome, "bag_"+bagName).getAbsolutePath());
if (prevService != null) {
BagIndex prevIndex = prevService.getBag(bagName);
if (prevIndex != null) {
Bytes[] table = PrefixCompressedBagIndex.determineCompressionTable(prevIndex, lengthToRowRatio);
PrefixCompressedBagIndex pcBagIndex = new PrefixCompressedBagIndex(bsBagIndex, table);
bagIndex = pcBagIndex;
bsBagIndex.setTermTableDepth(pcBagIndex.getNumCompressedBytes());
}
}
return new BagEntry(bagIndex);
}
});