Esempio n. 1
0
File: Exam.php Progetto: ubc/examdb
 /**
  * Delete index for the current exam entity
  *
  * @param \ZendSearch\Lucene\SearchIndexInterface $indexer
  */
 public function deleteIndex($indexer)
 {
     $hits = $indexer->find('pk:' . $this->getId());
     // there should be only one, but just in case
     foreach ($hits as $hit) {
         $indexer->delete($hit);
     }
     $indexer->commit();
 }
Esempio n. 2
0
 public function commit()
 {
     $this->index->commit();
 }