ZF-93: Multiple Commit in Index - Search returns no result (reported by tom (at) rtl (dot) lu)


Due to the fact, that creating an index and doing a commit at the end, is not working due to exaust of memory, I am commiting the index after each first word letter, so I have now a folder containing _0.cfs to _z.cfs & deletable & segments.

Now trying to do a search is always returning no result. a print_r of the Zend_Search_Lucene object returns certain stuff, which assumes that it is only using the first (_0.cfs) file:

[_fileHandlers:private] => Array


[segments] => Zend_Search_Lucene_Storage_File_Filesystem Object


[_fileHandle:private] => Resource id #56


[_0.cfs] => Zend_Search_Lucene_Storage_File_Filesystem Object


[_fileHandle:private] => Resource id #57



[_segFiles:private] => Array


[_0.fdx] => 106 [_0.fdt] => 130 [_0.fnm] => 618 [_0.tis] => 742 [_0.tii] => 1689 [_0.frq] => 1717 [_0.prx] => 1838


Trying to open the index with the Luke Java Application reports "No sub-file with id _0.f2 found". But trying to open an index directory which works (with a single commit) reports the error : "No sub-file with id _0.f1" found.

This index is working and there are the following files in it: _0.cfs deletable segments


It's the same problem as ZF-91.

Index has several segments, but only first is listed in a 'segments' file

fixed in SVN early. Changeset [412]

Fixed and tested