It doesn't look like there is any code setting up the dispatch for the listed tasks:

search_api.task.addIndex
search_api.task.updateIndex
search_api.task.removeIndex
search_api.task.deleteItems
search_api.task.deleteAllIndexItems

Right now I'm most interested in search_api.task.addIndex so I can alter the mapping going into Elasticsearch backend.

Within search_api\src\Task\TaskManager.php, the only operation I'm seeing happen is the search_api.task.trackItems once I've created an index.

public function executeSpecificTask(TaskInterface $task) {
$event = new TaskEvent($task);
$this->eventDispatcher->dispatch('search_api.task.' . $task->getType(), $event);

Comments

rferguson created an issue. See original summary.

drunken monkey’s picture

Category: Bug report » Support request
Status: Active » Fixed

I'm pretty sure those events aren't what you think they are. I think you want to use the associated hooks instead.
The events you list are just used internally by the server tasks manager – and those tasks are only created if the backend method of the same name fails, so it will be tried again later. If your search server works, those will never be used.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.