Skip to content

Commit

Permalink
[HF]Pour prendre ne compte le nouveau domaine elasticsearch
Browse files Browse the repository at this point in the history
  • Loading branch information
SparSio committed Mar 31, 2015
1 parent 27c824a commit 512e539
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ElasticSearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ public function register(Application $app)
}

foreach ($this->es_options as $es_option) {
$host_config = parse_url($es_option['host']);
$parsed_url = parse_url($es_option['host']);
$index = ltrim($parsed_url['path'], '/');

$app["elasticsearch.server"] = "{$host_config['scheme']}://{$host_config['host']}:{$host_config['port']}/";
$app["elasticsearch.index"] = ltrim($host_config['path'], '/');
$app["elasticsearch.server"] = str_replace($parsed_url['path'], '', $es_option['host']) . "/";
$app["elasticsearch.index"] = $index;
$app["elasticsearch.type"] = $es_option['type'];
break;
}
Expand Down

0 comments on commit 512e539

Please sign in to comment.