From: Šplíchal J. <spl...@to...> - 2012-04-12 12:36:36
|
Hello, please find attached TestIndexWriter.cpp extended with one more test that shows two different bugs: 1) If you leave the test as it is, than it crashes on line 680 when optimizing an index that was previously empty (all documents were deleted) and then some documents has been added. We were able to fix this bug, the problem is in SegmentMerger.cpp 769 where reader->norms(fi->name, normBuffer.values); is called with normBuffer.values == NULL. To prevent this it is sufficient to initialize the normBuffer at the beginning of the method with length 1. 2) If you uncomment writer->optimize(); on line 660 in the test, than the following call to writer->close(); crashes. We have not found any solution for this issue where we could be sure about all consequences. But the problematic method in this case is bool IndexWriter::flushDocStores() which intializes a local variable files by calling: const std::vector<std::string>& files = docWriter->files(); but the following calls have as side effect modification of this vector in such way that the application crashes. Best Regards, Jiri |