indexStream = directory.createOutput(IndexFileNames.segmentFileName(segment, IndexFileNames.FIELDS_INDEX_EXTENSION));
if(FieldsWriterCompress.isFdtCompress()&&!(directory instanceof RAMDirectory))
{
indexStream.writeInt(FieldsWriterCompress.FORMAT_CURRENT);
fieldsStream=new FdtCompressIndexOutput(fdt,1024*512);
fieldsStream.writeInt(FieldsWriterCompress.FORMAT_CURRENT);
}else{
fdt.writeInt(FORMAT_CURRENT);
indexStream.writeInt(FORMAT_CURRENT);