You are here

public function SearchApiElasticsearchBackend::defaultConfiguration in Elasticsearch Connector 8

Same name and namespace in other branches
  1. 8.7 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::defaultConfiguration()
  2. 8.2 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::defaultConfiguration()
  3. 8.5 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::defaultConfiguration()
  4. 8.6 src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php \Drupal\elasticsearch_connector\Plugin\search_api\backend\SearchApiElasticsearchBackend::defaultConfiguration()

Gets default configuration for this plugin.

Return value

array An associative array with the default configuration.

Overrides ConfigurablePluginBase::defaultConfiguration

File

src/Plugin/search_api/backend/SearchApiElasticsearchBackend.php, line 73
Contains the SearchApiElasticsearchBackend object.

Class

SearchApiElasticsearchBackend
Plugin annotation @SearchApiBackend( id = "elasticsearch", label = @Translation("Elasticsearch"), description = @Translation("Index items using an Elasticsearch server.") )

Namespace

Drupal\elasticsearch_connector\Plugin\search_api\backend

Code

public function defaultConfiguration() {
  return array(
    'cluster_settings' => array(
      'cluster' => '',
    ),
    'scheme' => 'http',
    'host' => 'localhost',
    'port' => '9200',
    'path' => '',
    'excerpt' => FALSE,
    'retrieve_data' => FALSE,
    'highlight_data' => FALSE,
    'http_method' => 'AUTO',
    'autocorrect_spell' => TRUE,
    'autocorrect_suggest_words' => TRUE,
  );
}