protected function doIndex(Posts $post)
{
$params = [];
$karma = $post->number_views + ($post->votes_up - $post->votes_down) * 10 + $post->number_replies;
if ($karma > 0) {
$params['body'] = ['id' => $post->id, 'title' => $post->title, 'category' => $post->categories_id, 'content' => $post->content, 'karma' => $karma];
$params['index'] = $this->config->get('index', 'phosphorum');
$params['type'] = 'post';
$params['id'] = 'post-' . $post->id;
$this->client->index($params);
}
}