--- a/server/src/app/Console/Commands/IndexDocuments.php Tue Dec 15 10:40:00 2015 +0100
+++ b/server/src/app/Console/Commands/IndexDocuments.php Thu Jan 14 18:35:23 2016 +0100
@@ -57,8 +57,8 @@
}
$indexParams['body'] = [
'settings' => [
- 'number_of_shards' => env('ELASTICSEARCH_SHARDS'),
- 'number_of_replicas' => env('ELASTICSEARCH_REPLICAS'),
+ 'number_of_shards' => conf('elasticsearch.shards'),
+ 'number_of_replicas' => conf('elasticsearch.replicas'),
'index.mapping.ignore_malformed' => True
],
'mappings' => [
@@ -97,7 +97,7 @@
private function indexOne($doc)
{
$query_data = [
- 'index' => env('ELASTICSEARCH_INDEX'),
+ 'index' => conf('elasticsearch.index'),
'type' => 'document',
'id' => (string)$doc->getId(),
'body' => [
@@ -119,7 +119,7 @@
foreach($docs as $doc){
$query_data['body'][] = [
'index' => [
- '_index' => env('ELASTICSEARCH_INDEX'),
+ '_index' => conf('elasticsearch.index'),
'_type' => 'document',
'_id' => (string)$doc->getId()
]