private function _mergeSegments($segments)
    {
        $newName = $this->_newSegmentName();

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

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

        $this->commit();
    }
private function _mergeSegments($segments)
    {
        $newName = $this->_newSegmentName();

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

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

        $this->commit();
    }
private function _mergeSegments ( $ segments ) { $ newName = $ this -> _newSegmentName ( ) ; /**
 * Zend_Search_Lucene_Index_SegmentMerger 
*/ include_once 'Zend/Search/Lucene/Index/SegmentMerger.php' ; $ merger = new Zend_Search_Lucene_Index_SegmentMerger ( $ this -> _directory , $ newName ) ; foreach ( $ segments as $ segmentInfo ) { $ merger -> addSource ( $ segmentInfo ) ; $ this -> _segmentsToDelete [ $ segmentInfo -> getName ( ) ] = $ segmentInfo -> getName ( ) ; } $ newSegment = $ merger -> merge ( ) ; if ( $ newSegment !== null ) { $ this -> _newSegments [ $ newSegment -> getName ( ) ] = $ newSegment ; } $ this -> commit ( ) ; }
Merge specified segments

$segments is an array of SegmentInfo objects

@param array $segments
Merge specified segments