Exemple #1
0
 /**
  * Delete all documents
  *
  * @return null
  */
 private static function _deleteAll()
 {
     if (self::$user) {
         self::$user->deleteElastic();
     }
     foreach (ElasticUser::all() as $obj) {
         if ($obj) {
             $obj->deleteElastic();
         }
     }
     ElasticUser::refreshElastic();
 }
Exemple #2
0
<?php

class ElasticUser extends User
{
    use TORM\ElasticSearch;
}
ElasticUser::setTableName("users");
ElasticUser::setElasticSearchIndex("torm");