Автор: Mikael Mattsson (mikael@wallmanderco.se)
Пример #1
0
 /**
  * Update post index.
  *
  * @param int $postsID
  */
 public function updatePost($postsID, $data)
 {
     try {
         $this->update(['index' => $this->getIndexName(), 'type' => 'post', 'id' => $postsID, 'body' => ['doc' => $data]]);
     } catch (Exception $e) {
         Log::add('Unable to update post ' . $postsID);
     }
 }
Пример #2
0
 /**
  * Admin Status Page.
  */
 public static function getStatus()
 {
     $indices = Elasticsearch::getIndices();
     $logs = Log::get();
     require ESI_PATH . '/views/admin/status.php';
 }
Пример #3
0
 /**
  * @param int|null $blogId
  */
 public function __construct($blogId = null)
 {
     $this->setBlog($blogId);
     return parent::__construct(['hosts' => Config::getHosts(), 'logging' => true, 'logPath' => Log::getFilePath('elasticsearch')]);
 }