Esempio n. 1
0
 /**
  * We trigger index/unindex operations on postFlush events
  *
  * @param PostFlushEventArgs $ea
  */
 public function postFlush(PostFlushEventArgs $ea)
 {
     foreach ($this->scheduledIndexations as $entity) {
         $this->elastica->index($entity);
     }
     $this->scheduledIndexations = array();
     foreach ($this->scheduledUnindexations as $entity) {
         $this->elastica->indexRemove($entity);
     }
     $this->scheduledUnindexations = array();
 }