I am new to Magento. I have a custom module in Magento 2 that has a table with data and CRUD models. I want to create an indexer for it to be able to push it to Elasticsearch.
I already created the indexer.xml and mview.xml files, as well as class inside the Model\Indexer
namespace. Here it is:
namespace VendorName\Faq\Model\Indexer;
class Question implements \Magento\Framework\Indexer\ActionInterface, \Magento\Framework\Mview\ActionInterface
{
public function execute($ids) {
// ???
}
public function executeFull() {
// ???
}
public function executeList(array $ids) {
// ???
}
public function executeRow($id0 {
// ???
}
}
The official documentation has nothing to tell about how to get data for indexing - it only has a structure for the Indexer class.
Any suggestions, please?