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

Commit

Permalink
Merge branch 'master' of github.com:dpc-sdp/tide_search
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-malkoun committed May 7, 2019
2 parents 97427fd + 9c97390 commit e317f66
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 e317f66

Please sign in to comment.