Lucene+PHPでoptimize時のエラー: failed to open stream: Too many open files



MergeFactor auto-optimization option
MergeFactor determines how often segment indices are merged by addDocument(). With smaller values, less RAM is used while indexing, and searches on unoptimized indices are faster, but indexing speed is slower. With larger values, more RAM is used during indexing, and while searches on unoptimized indices are slower, indexing is faster. Thus larger values (> 10) are best for batch index creation, and smaller values (< 10) for indices that are interactively maintained.

MergeFactor is a good estimation for average number of segments merged by one auto-optimization pass. Too large values produce large number of segments while they are not merged into new one. It may be a cause of "failed to open stream: Too many open files" error message. This limitation is system dependent.

MergeFactor can be retrieved or set by $index->getMergeFactor() or $index->setMergeFactor($mergeFactor) calls.

Default value is 10.

Lucene Java and Luke (Lucene Index Toolbox - » can also be used to optimize an index. Latest Luke release (v0.8) is based on Lucene v2.3 and compatible with current implementation of Zend_Search_Lucene component (Zend Framework 1.6). Earlier versions of Zend_Search_Lucene implementations need another versions of Java Lucene tools to be compatible:

Zend Framework 1.5 - Java Lucene 2.1 (Luke tool v0.7.1 -

Zend Framework 1.0 - Java Lucene 1.4 - 2.1 (Luke tool v0.6 -

This entry was posted on 水曜日, 5月 18th, 2011 at 6:57 PM and is filed under Lucene, php. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android

unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発