Skip to content

Commit 71d621e

Browse files
committed
MAGETWO-93966: Run Catalog Search reindex in multithread mode with Elasticsearch 5
1 parent ba33150 commit 71d621e

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

app/code/Magento/Elasticsearch/Elasticsearch5/Model/Client/Elasticsearch.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
class Elasticsearch implements ClientInterface
1515
{
1616
/**
17-
* Elasticsearch Client instance
17+
* Elasticsearch Client instances
1818
*
1919
* @var \Elasticsearch\Client[]
2020
*/
21-
protected $client;
21+
private $client;
2222

2323
/**
2424
* @var array
2525
*/
26-
protected $clientOptions;
26+
private $clientOptions;
2727

2828
/**
2929
* @var bool
3030
*/
31-
protected $pingResult;
31+
private $pingResult;
3232

3333
/**
3434
* @var string

app/code/Magento/Elasticsearch/Model/Client/Elasticsearch.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@
1515
class Elasticsearch implements ClientInterface
1616
{
1717
/**
18-
* Elasticsearch Client instance
18+
* Elasticsearch Client instances
1919
*
2020
* @var \Elasticsearch\Client[]
2121
*/
22-
protected $client;
22+
private $client;
2323

2424
/**
2525
* @var array
2626
*/
27-
protected $clientOptions;
27+
private $clientOptions;
2828

2929
/**
3030
* @var bool
3131
*/
32-
protected $pingResult;
32+
private $pingResult;
3333

3434
/**
3535
* Initialize Elasticsearch Client
@@ -57,6 +57,11 @@ public function __construct(
5757
$this->clientOptions = $options;
5858
}
5959

60+
/**
61+
* Get Elasticsearch Client
62+
*
63+
* @return \Elasticsearch\Client
64+
*/
6065
private function getClient()
6166
{
6267
$pid = getmypid();
@@ -66,6 +71,7 @@ private function getClient()
6671
}
6772
return $this->client[$pid];
6873
}
74+
6975
/**
7076
* Ping the Elasticsearch client
7177
*

0 commit comments

Comments
 (0)