Exemplo n.º 1
0
 /**
  * Adds a document to this index.
  *
  * @param Zend_Search_Lucene_Document $document
  */
 public function addDocument(Zend_Search_Lucene_Document $document)
 {
     if ($this->_currentSegment === null) {
         $this->_currentSegment = new Zend_Search_Lucene_Index_SegmentWriter($this->_directory, $this->_newSegmentName());
     }
     $this->_currentSegment->addDocument($document);
     $this->_version++;
 }