public function buildSearchIndexAction() { $total =
(int) $this->
Request()->
getParam('total'
);
$iteration =
(int) $this->
Request()->
getParam('iteration', 1
);
$lastId =
(int) $this->
Request()->
getParam('lastId'
);
$offset =
($iteration - 1
) * CustomerStreamRepository::INDEXING_LIMIT;
$handled =
$offset + CustomerStreamRepository::INDEXING_LIMIT;
$full =
$this->
Request()->
getParam('full'
);
$ids =
$this->
getApiResource()->
buildSearchIndex($lastId,
$full);
$snippets =
$this->container->
get('snippets'
)->
getNamespace('backend/customer/view/main'
);
if ($handled >=
$total) { $this->
getApiResource()->
cleanupIndexSearchIndex();
$this->
View()->
assign([ 'success' => true,
'finish' => true,
'progress' => 1,
'text' =>
$snippets->
get('customer_refreshed'
),
]);