/** * 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); } }
/** * Admin Status Page. */ public static function getStatus() { $indices = Elasticsearch::getIndices(); $logs = Log::get(); require ESI_PATH . '/views/admin/status.php'; }
/** * @param int|null $blogId */ public function __construct($blogId = null) { $this->setBlog($blogId); return parent::__construct(['hosts' => Config::getHosts(), 'logging' => true, 'logPath' => Log::getFilePath('elasticsearch')]); }