public function SearchApiElasticsearchBackend::addIndex in Elasticsearch Connector 8.7
Same name and namespace in other branches
- 8 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::addIndex()
- 8.2 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::addIndex()
- 8.5 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::addIndex()
- 8.6 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::addIndex()
Adds a new index to this server.
If the index was already added to the server, the object should treat this as if removeIndex() and then addIndex() were called.
Parameters
\Drupal\search_api\IndexInterface $index: The index to add.
Throws
\Drupal\search_api\SearchApiException Thrown if an error occurred while adding the index.
Overrides BackendPluginBase::addIndex
2 calls to SearchApiElasticsearchBackend::addIndex()
- SearchApiElasticsearchBackend::deleteAllIndexItems in src/
Plugin/ search_api/ backend/ SearchApiElasticsearchBackend.php - Deletes all the items from the index.
- SearchApiElasticsearchBackend::fieldsUpdated in src/
Plugin/ search_api/ backend/ SearchApiElasticsearchBackend.php - Create or re-create the given index's field mapping.
File
- src/
Plugin/ search_api/ backend/ SearchApiElasticsearchBackend.php, line 396
Class
- SearchApiElasticsearchBackend
- Elasticsearch Search API Backend definition.
Namespace
Drupal\elasticsearch_connector\Plugin\search_api\backendCode
public function addIndex(IndexInterface $index) {
$this
->updateIndex($index);
}