XF 1.5 Elastic index is not updated when POST is updated


Active member
I want to update few posts in Elastic has stale contents. I made following script, but it seems that it's not updating in Elastic.

$startTime = microtime(true);

$fileDir = dirname(__FILE__);

require($fileDir . '/library/XenForo/Autoloader.php');

XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);

XenForo_Application::set('page_start_time', $startTime);

// select query to make mapping of IPs

$db = XenForo_Application::getDb();

// live IDs


foreach ($arrIds as $id) {


    $obj = $model->getPostById($id);

    $dw = XenForo_DataWriter::create('XenForo_DataWriter_DiscussionMessage_Post');


    $dw->set('message', $obj['message']);


Is there any way to rebuild only few posts by IDs in Elastic? I am using ES plugin for search on our site.
Top Bottom