String quickTis=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_EXTENSION_QUICK);
String quickTisTxt=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_EXTENSION_QUICK_TXT);
String quickTisVal=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_EXTENSION_QUICK_VAL);
if(directory.fileExists(tisFileSize))
{
IndexInput sizebuff=directory.openInput(tisFileSize, readBufferSize);
tisfilesize=sizebuff.readLong();
if(directory.fileExists(quickTis))
{
docValues=new DocValuesReader();
docValues.quicktisInput=new SmallBufferedInput(directory.openInput(quickTis, 8),8);
docValues.quicktisInputTxt=new SmallBufferedInput(directory.openInput(quickTisTxt,1024),1024);
docValues.quicktisInputVal=new SmallBufferedInput(directory.openInput(quickTisVal,8),8);
// if(directory instanceof FSDirectory){
// docValues.quicktisInput=BlockBufferInput.MaybeInstance(directory.openInput(quickTis,readBufferSize),directory,quickTis,directory.getP());
// docValues.quicktisInputTxt=BlockBufferInput.MaybeInstance(directory.openInput(quickTisTxt,readBufferSize),directory,quickTisTxt,directory.getP());
// docValues.quicktisInputVal=BlockBufferInput.MaybeInstance(directory.openInput(quickTisVal,readBufferSize),directory,quickTisVal,directory.getP());
// }else if(directory instanceof FileSystemDirectory){
// docValues.quicktisInput=BlockBufferInput.MaybeInstance(directory.openInput(quickTis,readBufferSize),directory,quickTis,directory.getP());
// docValues.quicktisInputTxt=BlockBufferInput.MaybeInstance(directory.openInput(quickTisTxt,readBufferSize),directory,quickTisTxt,directory.getP());
// docValues.quicktisInputVal=BlockBufferInput.MaybeInstance(directory.openInput(quickTisVal,readBufferSize),directory,quickTisVal,directory.getP());
// }else{}
docValues.readPosForm(sizebuff);
supportquick.set(true);
}
sizebuff.close();
}
String filename=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_EXTENSION);
final String indexFileName = IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_INDEX_EXTENSION);
final String indexFileNamequick = IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_INDEX_EXTENSION_QUICK);
if (directory instanceof FSDirectory) {
tisInput = BlockBufferInput.MaybeInstance(
directory.openInput(filename, readBufferSize),
directory, filename, directory.getP());
tiiInput = directory.openInput(indexFileName, readBufferSize);
} else if (directory instanceof FileSystemDirectory) {
tisInput = BlockBufferInput.MaybeInstance(
directory.openInput(filename, readBufferSize),
directory, filename, directory.getP());
tiiInput = directory.openInput(indexFileName, readBufferSize);
} else {
tisInput = directory.openInput(filename, readBufferSize);
tiiInput = directory.openInput(indexFileName, readBufferSize);
}
if(directory.fileExists(indexFileNamequick))
{
tiiInputquick=directory.openInput(indexFileNamequick, readBufferSize);
this.isQuickMode.set(true);
}
origEnum = new SegmentTermEnum(tisInput, fieldInfos, false,tisfilesize);
size = origEnum.size;
if (indexDivisor != -1) {
long tiifilesize=-1;
String tiiFileSize=IndexFileNames.segmentFileName(segment, IndexFileNames.TERMS_INDEX_EXTENSION_SIZE);
if(directory.fileExists(tiiFileSize))
{
IndexInput sizebuff=directory.openInput(tiiFileSize, readBufferSize);
tiifilesize=sizebuff.readLong();
sizebuff.close();
}
// Load terms index
totalIndexInterval = origEnum.indexInterval * indexDivisor;
SegmentTermEnum indexEnum=null ;
try {