Skip to content
Snippets Groups Projects
Commit 9b8557e8 authored by Adam Bramley's avatar Adam Bramley Committed by Kim Pepper
Browse files

Issue #3272830 by acbramley: Update index throws exception if index doesn't exist

parent 8766765b
No related branches found
No related tags found
No related merge requests found
Pipeline #4973 failed
......@@ -257,8 +257,14 @@ class BackendClient implements BackendClientInterface {
* {@inheritdoc}
*/
public function updateIndex(IndexInterface $index): void {
$index->clear();
$this->updateFieldMapping($index);
if ($this->indexExists($index)) {
$index->clear();
$this->updateSettings($index);
$this->updateFieldMapping($index);
}
else {
$this->addIndex($index);
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment