CLUCENE-0.9.10 BUG及修改方法列表
IndexWriter.cpp文件IndexWriter::close函数中,如果指定目录在退出时不关闭,则不能删除目录对象。 修改: if ( closeDir ){ directory->close(); } _CLDECDELETE(directory); 为 if ( closeDir ){ directory->close(); _CLDECDELETE(directory); } IndexWriter.cpp文件IndexWriter ::optimize函数中,如果 segmentInfo->size() == 0,则会导致异常。 修改: flushRamSegments(); 为 flushRamSegments(); if(segmentInfos->size() == 0) return; 修改IndexWriter::addIndexes(Directory** dirs)函数,因为SegmentInfos对象在析构时会删除所有对象,因此在函数退出时会导致无效的指针。 修改 // start with zero or 1 seg so optimize the current optimize(); //Iterate through the directories int32_t i = 0; while ( dirs[i] != NULL ) { // DSR: Changed SegmentInfos constructor arg (see bug discussion below). SegmentInfos sis(false); sis....