/**
* 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);
}
}