public function Database::postUpdate in Search API 8
Notifies the backend that its configuration was updated.
The server's $original property can be used to inspect the old configuration values.
Return value
bool TRUE, if the update requires reindexing of all content on the server.
Overrides BackendPluginBase::postUpdate
File
- modules/
search_api_db/ src/ Plugin/ search_api/ backend/ Database.php, line 601
Class
- Database
- Indexes and searches items using the database.
Namespace
Drupal\search_api_db\Plugin\search_api\backendCode
public function postUpdate() {
if (empty($this->server->original)) {
// When in doubt, opt for the safer route and reindex.
return TRUE;
}
$original_config = $this->server->original
->getBackendConfig();
$original_config += $this
->defaultConfiguration();
return $this->configuration['min_chars'] != $original_config['min_chars'];
}