/**
  * @param LifecycleEventArgs $args
  */
 public function postPersist(LifecycleEventArgs $args)
 {
     $entity = $args->getDocument();
     try {
         $this->solr->addDocument($entity);
     } catch (\RuntimeException $e) {
         $this->logger->debug($e->getMessage());
     }
 }
 /**
  * @param LifecycleEventArgs $args
  */
 public function preRemove(LifecycleEventArgs $args)
 {
     $entity = $args->getEntity();
     try {
         $this->solr->removeDocument($entity);
     } catch (\RuntimeException $e) {
         $this->logger->debug($e->getMessage());
     }
 }