$indexer =
$this->registry->
getIndexer($indexer);
$offset =
['offset' =>
$request->
get('offset'
)];
$message =
$indexer ?
$indexer->
iterate($offset) : null;
if ($message === null
) { return new JsonResponse(['finish' => true
]);
} $message->
addSkip(...
$indexingSkips);
if ($indexer) { $indexer->
handle($message);
} return new JsonResponse(['finish' => false, 'offset' =>
$message->
getOffset()]);
} #[Route(path: '/api/_action/index-products', name: 'api.action.indexing.products', methods: ['POST'])]
public function products(Request
$request): JsonResponse
{