Example #1
0
    /**
     * 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();
    }
 /**
  * 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);
 }
Example #3
0
 /**
  * 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;
 }