magento2-vsbridge-indexer icon indicating copy to clipboard operation
magento2-vsbridge-indexer copied to clipboard

Feature Request: Trigger Full Reindex from Magento Admin Backend

Open simonmaass opened this issue 3 years ago • 4 comments

It would be great if there was a button in the config to trigger a full reindex:

image

simonmaass avatar Nov 29 '21 16:11 simonmaass

@simonmaass I just created my own module to do it. It's just a simple magento ajax button that executes the below. Also in the same module we have a button that clear the Redis cache as well. Let me know if you want the module.

public function execute() { try { $command = 'php bin/magento vsbridge:reindex --all'; exec($command); } catch (\Exception $e) { $result = $this->resultJsonFactory->create(); return $result->setData(['success' => true, 'message' => $e]); }

    $message = 'done';
    /** @var \Magento\Framework\Controller\Result\Json $result */
    $result = $this->resultJsonFactory->create();

    return $result->setData(['success' => true, 'message' => $message]);
}

clinton-origin avatar Dec 07 '21 11:12 clinton-origin

@clinton-origin oh that would be awesome if you could share it :)

simonmaass avatar Dec 07 '21 11:12 simonmaass

@simonmaass Here you go

https://github.com/clinton-origin/Magento-2-Cache-Cleaner

Just replace "Origin" with whatever you like in the system.xml file. This will show a tab in the Store > Config section

clinton-origin avatar Dec 07 '21 11:12 clinton-origin

thank you!

simonmaass avatar Dec 07 '21 11:12 simonmaass