- Issue created by @stborchert
- 🇩🇪Germany mkalkbrenner 🇩🇪
These two functions are part of the API. And it seems that this issue might affect any backend, not just Solr. I think, the check has to happen in Search API itself.
Do you agree to move that issue? - 🇦🇹Austria drunken monkey Vienna, Austria
drunken monkey → made their first commit to this issue’s fork.
- 🇦🇹Austria drunken monkey Vienna, Austria
Thanks for reporting this problem, and sorry it took me a while to get back to you!
However, it seems that the\Drupal\search_api\Backend\BackendPluginBase::preDelete()
method already catchesSearchApiException
when calling$server->deleteAllItems()
so I’m not sure how this could lead to the operation failing? I think logging the problem makes sense, in any case, since the user should know in case they expected the server to be cleared. (In your case, I agree, it doesn’t make sense, but hard to know that.) Therefore, I’m not even sure whether wrapping this call inif ($this->isAvailable())
would be a good idea – in the end, we’d then probably still have to log a warning or error to the user explaining that we couldn’t remove our data from the server.In any case, could you please tell me the exact class of exception being thrown and, if it is an instance of
\Drupal\search_api\SearchApiException
, can you try to find out why thetry
/catch
inBackendPluginBase::preDelete()
isn’t working?