Skip to content

Commit 4b61215

Browse files
committed
ACP2E-3892: [Mainline] Unpopulated pages are cached due to search engine errors
1 parent 477965e commit 4b61215

File tree

5 files changed

+3
-42
lines changed

5 files changed

+3
-42
lines changed

app/code/Magento/Catalog/Block/Product/ListProduct.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ class ListProduct extends AbstractProduct implements IdentityInterface
8989
* @param array $data
9090
* @param OutputHelper|null $outputHelper
9191
* @param SpecialPriceBulkResolverInterface|null $specialPriceBulkResolver
92-
* @param ResponseHttp|null $response
9392
*/
9493
public function __construct(
9594
Context $context,

app/code/Magento/CatalogSearch/i18n/en_US.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ name,name
4242
"This value must be compatible with the corresponding setting in the configured search engine.","This value must be compatible with the corresponding setting in the configured search engine."
4343
"If not specified, Default Search Engine will be used.","If not specified, Default Search Engine will be used."
4444
"This search engine option is no longer supported by Adobe. It is recommended to use OpenSearch as a search engine instead.","This search engine option is no longer supported by Adobe. It is recommended to use OpenSearch as a search engine instead."
45+
"Could not perform search","Could not perform search"

app/code/Magento/Elasticsearch/ElasticAdapter/SearchAdapter/Adapter.php

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Elasticsearch\ElasticAdapter\SearchAdapter;
77

@@ -49,23 +49,6 @@ class Adapter implements AdapterInterface
4949
*/
5050
private $queryContainerFactory;
5151

52-
/**
53-
* Empty response from Elasticsearch.
54-
*
55-
* @var array
56-
*/
57-
private static $emptyRawResponse = [
58-
'hits' => [
59-
'hits' => []
60-
],
61-
'aggregations' => [
62-
'price_bucket' => [],
63-
'category_bucket' => [
64-
'buckets' => []
65-
]
66-
]
67-
];
68-
6952
/**
7053
* @var LoggerInterface
7154
*/

lib/internal/Magento/Framework/Search/AdapterInterface.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,6 @@
1616
*/
1717
interface AdapterInterface
1818
{
19-
public const EMPTY_RAW_RESPONSE = [
20-
'hits' => [
21-
'hits' => []
22-
],
23-
'aggregations' => [
24-
'price_bucket' => [],
25-
'category_bucket' => [
26-
'buckets' => []
27-
]
28-
]
29-
];
30-
3119
/**
3220
* Process Search Request
3321
*

lib/internal/Magento/Framework/Search/Search.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Framework\Search;
77

88
use Magento\AdvancedSearch\Model\Client\ClientException;
9-
use Magento\Elasticsearch\SearchAdapter\ResponseFactory;
109
use Magento\Framework\Api\Search\SearchInterface;
1110
use Magento\Framework\Api\Search\SearchCriteriaInterface;
1211
use Magento\Framework\App\ScopeResolverInterface;
@@ -38,35 +37,26 @@ class Search implements SearchInterface
3837
*/
3938
private SearchResponseBuilder $searchResponseBuilder;
4039

41-
/**
42-
* @var ResponseFactory
43-
*/
44-
private ResponseFactory $responseFactory;
45-
4640
/**
4741
* @param Builder $requestBuilder
4842
* @param ScopeResolverInterface $scopeResolver
4943
* @param SearchEngineInterface $searchEngine
5044
* @param SearchResponseBuilder $searchResponseBuilder
51-
* @param ResponseFactory $responseFactory
5245
*/
5346
public function __construct(
5447
Builder $requestBuilder,
5548
ScopeResolverInterface $scopeResolver,
5649
SearchEngineInterface $searchEngine,
5750
SearchResponseBuilder $searchResponseBuilder,
58-
ResponseFactory $responseFactory
5951
) {
6052
$this->requestBuilder = $requestBuilder;
6153
$this->scopeResolver = $scopeResolver;
6254
$this->searchEngine = $searchEngine;
6355
$this->searchResponseBuilder = $searchResponseBuilder;
64-
$this->responseFactory = $responseFactory;
6556
}
6657

6758
/**
6859
* @inheritdoc
69-
* @throws LocalizedException
7060
*/
7161
public function search(SearchCriteriaInterface $searchCriteria)
7262
{

0 commit comments

Comments
 (0)