本文整理匯總了PHP中Zend_Search_Lucene_Index_SegmentWriter類的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Search_Lucene_Index_SegmentWriter類的具體用法?PHP Zend_Search_Lucene_Index_SegmentWriter怎麽用?PHP Zend_Search_Lucene_Index_SegmentWriter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Zend_Search_Lucene_Index_SegmentWriter類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* Object constructor.
*
* @param Zend_Search_Lucene_Storage_Directory $directory
* @param string $name
*/
public function __construct(Zend_Search_Lucene_Storage_Directory $directory, $name)
{
parent::__construct($directory, $name);
$this->_termDocs = array();
$this->_termDictionary = array();
}
示例2: __construct
/**
* Object constructor.
*
* @param Zend_Search_Lucene_Storage_Directory $directory
* @param string $name
*/
public function __construct(Zend_Search_Lucene_Storage_Directory $directory, $name)
{
parent::__construct($directory, $name);
}
示例3: commit
/**
* Commit current changes
* returns array of new segments
*
* @return array
*/
public function commit()
{
if ($this->_currentSegment !== null) {
$newSegment = $this->_currentSegment->close();
if ($newSegment !== null) {
$this->_newSegments[$newSegment->getName()] = $newSegment;
}
$this->_currentSegment = null;
}
if (count($this->_newSegments) != 0) {
$this->_updateSegments();
}
$result = $this->_newSegments;
$this->_newSegments = array();
return $result;
}