public function SearchApiSolrBackend::updateIndex in Search API Solr 8
Same name and namespace in other branches
- 8.3 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::updateIndex()
- 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::updateIndex()
- 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::updateIndex()
Notifies the server that an index attached to it has been changed.
If any user action is necessary as a result of this, the method should set a message to notify the user.
Parameters
\Drupal\search_api\IndexInterface $index: The updated index.
Throws
\Drupal\search_api\SearchApiException Thrown if an error occurred while reacting to the change.
Overrides BackendPluginBase::updateIndex
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php, line 650
Class
- SearchApiSolrBackend
- Apache Solr backend for search api.
Namespace
Drupal\search_api_solr\Plugin\search_api\backendCode
public function updateIndex(IndexInterface $index) {
if ($this
->indexFieldsUpdated($index)) {
$index
->reindex();
}
}