File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
app/code/Magento/Elasticsearch8
Block/Adminhtml/System/Config Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class TestConnection extends \Magento\AdvancedSearch\Block\Adminhtml\System\Conf
15
15
/**
16
16
* @inheritdoc
17
17
*/
18
- protected function _getFieldMapping (): array
18
+ public function _getFieldMapping (): array
19
19
{
20
20
$ fields = [
21
21
'engine ' => 'catalog_search_engine ' ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ class Elasticsearch extends \Magento\Elasticsearch\Model\Adapter\Elasticsearch
20
20
* @param string $action
21
21
* @return array
22
22
*/
23
- protected function getDocsArrayInBulkIndexFormat (
23
+ public function getDocsArrayInBulkIndexFormat (
24
24
$ documents ,
25
25
$ indexName ,
26
26
$ action = self ::BULK_ACTION_INDEX
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ class Elasticsearch implements ClientInterface
32
32
*/
33
33
private array $ client ;
34
34
35
-
36
35
/**
37
36
* @var bool|null
38
37
*/
@@ -91,7 +90,9 @@ private function getElasticsearchClient(): Client /** @phpstan-ignore-line */
91
90
$ pid = getmypid ();
92
91
if (!isset ($ this ->client [$ pid ])) {
93
92
$ config = $ this ->buildESConfig ($ this ->clientOptions );
94
- $ this ->client [$ pid ] = ClientBuilder::fromConfig ($ config , true ); /** @phpstan-ignore-line */
93
+ if (class_exists (\Elastic \Elasticsearch \ClientBuilder::class)) {
94
+ $ this ->client [$ pid ] = ClientBuilder::fromConfig ($ config , true ); /** @phpstan-ignore-line */
95
+ }
95
96
}
96
97
return $ this ->client [$ pid ];
97
98
}
You can’t perform that action at this time.
0 commit comments