original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: Merge specified segments
  
  $segments is an array of SegmentInfo objects
  
  @param array $segments
docstring_tokens: Merge specified segments