Skip to content

Commit

Permalink
Merge pull request #14 from CheapHasz/remove-elasticsearch-support
Browse files Browse the repository at this point in the history
Remove elasticsearch support
  • Loading branch information
CheapHasz authored Oct 1, 2020
2 parents 21fc08e + 8efc487 commit 2161a94
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 89 deletions.
32 changes: 0 additions & 32 deletions src/Elasticsearch/Client.php

This file was deleted.

26 changes: 0 additions & 26 deletions src/Elasticsearch/ClientBuilder.php

This file was deleted.

28 changes: 0 additions & 28 deletions src/Factory/ClientFactory.php

This file was deleted.

6 changes: 4 additions & 2 deletions src/Provider/IndexProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public function rebuildIndex($markAsLive = true, $removeOldIndexes = true): Inde
* @param Index $index The index to link to the $this->name alias
* @param bool $removeOldIndexes If true, remove the indexes currently linked to $this->name alias after marking $index as live
*
* @throws \Exception if the index couldn't be marked as live
*
* @return bool index is markedAsLive
*/
public function markAsLive(Index $index, bool $removeOldIndexes = true): bool
Expand All @@ -95,7 +97,7 @@ public function markAsLive(Index $index, bool $removeOldIndexes = true): bool
}
// and delete the failed one
$index->delete();
return false;
throw $e;
}
if ($removeOldIndexes) {
// if everything went well, the new index is set as the alias
Expand All @@ -109,7 +111,7 @@ public function markAsLive(Index $index, bool $removeOldIndexes = true): bool

return true;
}

protected function getIndexByName($name): Index
{
return new Index($this->eventDispatcher, $this->client, $name);
Expand Down
1 change: 0 additions & 1 deletion src/Resources/config/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<services>
<defaults autoconfigure="true" autowire="true" public="false" />

<service id="Novaway\ElasticsearchBundle\Factory\ClientFactory" />
<service id="Novaway\ElasticsearchBundle\DataCollector\ElasticsearchDataCollector">
<tag name="data_collector"
template="@NovawayElasticsearch/data_collector/template.html.twig"
Expand Down

0 comments on commit 2161a94

Please sign in to comment.