Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
[SDPA-2005] Refactored ES Connector service alts. (#15)
Browse files Browse the repository at this point in the history
* [SDPA-2005] Refactored ES Connector service alts.

* [SDPA-2005] Remove unused use statements.

* [SDPA-2005] Fixed linting errors.
  • Loading branch information
GROwen authored Apr 16, 2019
1 parent 7a3f3de commit 9c97390
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

namespace Drupal\tide_search\ElasticSearch\Parameters\Factory;

use Drupal\search_api\IndexInterface;
use Drupal\elasticsearch_connector\ElasticSearch\Parameters\Factory\IndexFactory;
use Drupal\elasticsearch_connector\Entity\Cluster;
use Drupal\search_api\Entity\Server;
use Drupal\search_api\IndexInterface;

/**
* Create Elasticsearch Indices.
* Customised implementation for creation of Elasticsearch Indices.
*/
class TideSearchIndexFactory extends IndexFactory {

const HASH_LENGTH = 32;

/**
* Override the elasticsearch_connector bulk delete params.
* Overrides the elasticsearch_connector bulk delete params.
*
* @param \Drupal\search_api\IndexInterface $index
* The Search API Index.
Expand Down
21 changes: 21 additions & 0 deletions src/TideSearchServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Drupal\tide_search;

use Drupal\Core\DependencyInjection\ServiceModifierInterface;
use Drupal\Core\DependencyInjection\ContainerBuilder;

/**
* Replaces the queuers and processors plugin managers with failing stubs.
*/
class TideSearchServiceProvider implements ServiceModifierInterface {

/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$definition = $container->getDefinition('elasticsearch_connector.index_factory');
$definition->setClass('Drupal\tide_search\ElasticSearch\Parameters\Factory\TideSearchIndexFactory');
}

}
3 changes: 0 additions & 3 deletions tide_search.services.yml

This file was deleted.

0 comments on commit 9c97390

Please sign in to comment.