Issues

ZF-1954: Zend_Search_Lucene uses compound file format by default for pre-2.1 indices. Actually it should be checked

Description

According to the Michael Feichtinger report, Nutch 0.9 (uses Lucene 2.0) may prepare index using non-compound segment files format.

It produces the error:


Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'File 'crawlOld/index/_0.cfs' is not readable.' in D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene\Storage\File\Filesystem.php:59 
Stack trace: 
#0 D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene\Storage\Directory\Filesystem.php(341): Zend_Search_Lucene_Storage_File_Filesystem->__construct('crawlOld/index/...') 
#1 D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene\Index\SegmentInfo.php(200): Zend_Search_Lucene_Storage_Directory_Filesystem->getFileObject('_0.cfs') 
#2 D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene.php(340): Zend_Search_Lucene_Index_SegmentInfo->__construct(Object(Zend_Search_Lucene_Storage_Directory_Filesystem), '_0', 143, 0, false, true) 
#3 D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene.php(473): Zend_Search_Lucene->_readPre21SegmentsFile() 
#4 D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene.php(181): Zend_Search_Lucene->__constr in D:\Websites\akooe\branch\htdocs\lucene\library\Zend\Search\Lucene\Storage\File\Filesystem.php on line 59

Actual segment format should be determined "on the fly" for pre-2.1 indices

Comments

Fixed.