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
1515 /**
1616 * @inheritdoc
1717 */
18- protected function _getFieldMapping (): array
18+ public function _getFieldMapping (): array
1919 {
2020 $ fields = [
2121 '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
2020 * @param string $action
2121 * @return array
2222 */
23- protected function getDocsArrayInBulkIndexFormat (
23+ public function getDocsArrayInBulkIndexFormat (
2424 $ documents ,
2525 $ indexName ,
2626 $ action = self ::BULK_ACTION_INDEX
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ class Elasticsearch implements ClientInterface
3232 */
3333 private array $ client ;
3434
35-
3635 /**
3736 * @var bool|null
3837 */
@@ -91,7 +90,9 @@ private function getElasticsearchClient(): Client /** @phpstan-ignore-line */
9190 $ pid = getmypid ();
9291 if (!isset ($ this ->client [$ pid ])) {
9392 $ 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+ }
9596 }
9697 return $ this ->client [$ pid ];
9798 }
You can’t perform that action at this time.
0 commit comments