示例#1
0
    public function testGetName()
    {
        $directory = new Directory\Filesystem(__DIR__ . '/_source/_files');
        $segmentInfo = new Index\SegmentInfo($directory, '_1', 2);

        $this->assertEquals($segmentInfo->getName(), '_1');
    }
示例#2
0
 /**
  * Add segmnet to a collection of segments to be merged
  *
  * @param \Zend\Search\Lucene\Index\SegmentInfo $segment
  */
 public function addSource(SegmentInfo $segmentInfo)
 {
     $this->_segmentInfos[$segmentInfo->getName()] = $segmentInfo;
 }