Logo Search packages:      
Sourcecode: zendframework version File versions  Download package

Zend_Search_Lucene_Index_Writer::_mergeSegments ( segments ) [private]

Merge specified segments

$segments is an array of SegmentInfo objects



Definition at line 372 of file Writer.php.

References _newSegmentName(), and commit().

Referenced by _maybeMergeSegments(), and optimize().

        $newName = $this->_newSegmentName();

        /** Zend_Search_Lucene_Index_SegmentMerger */
        require_once 'Zend/Search/Lucene/Index/SegmentMerger.php';
        $merger = new Zend_Search_Lucene_Index_SegmentMerger($this->_directory,
        foreach ($segments as $segmentInfo) {
            $this->_segmentsToDelete[$segmentInfo->getName()] = $segmentInfo->getName();

        $newSegment = $merger->merge();
        if ($newSegment !== null) {
            $this->_newSegments[$newSegment->getName()] = $newSegment;


Here is the call graph for this function:

Here is the caller graph for this function:

Generated by  Doxygen 1.6.0   Back to index