Skip to content

Commit 9250ce4

Browse files
committed
MCP-811: Performance Optimization for Catalog GraphQL
1 parent 9888e1e commit 9250ce4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Elasticsearch/SearchAdapter/Aggregation/Builder/Dynamic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private function getEntityStorage(array $queryResult)
5959
{
6060
$ids = [];
6161
foreach ($queryResult['hits']['hits'] as $document) {
62-
if (!array_key_exists('_id', $document) && array_key_exists('fields', $document)) {
62+
if (!array_key_exists('_id', $document) && array_key_exists('_id', $document['fields'])) {
6363
$document['_id'] = $document['fields']['_id'][0];
6464
unset($document['fields']);
6565
}

app/code/Magento/Elasticsearch/SearchAdapter/ResponseFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function create($response)
6464
{
6565
$documents = [];
6666
foreach ($response['documents'] as $rawDocument) {
67-
if (!array_key_exists('_id', $rawDocument) && array_key_exists('fields', $rawDocument)) {
67+
if (!array_key_exists('_id', $rawDocument) && array_key_exists('_id', $rawDocument['fields'])) {
6868
$rawDocument['_id'] = $rawDocument['fields']['_id'][0];
6969
unset($rawDocument['fields']);
7070
}

0 commit comments

Comments
 (0)