Skip to content

Commit 3b13045

Browse files
committed
Merge remote-tracking branch 'github-magento2ce/MAGETWO-91753' into EPAM-PR-14
2 parents 6205673 + 8ab0552 commit 3b13045

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

app/code/Magento/CatalogSearch/Model/Search/FilterMapper/CustomAttributeFilter.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
use Magento\Catalog\Model\Product;
1717

1818
/**
19-
* Class CustomAttributeFilter
20-
* Applies filters by custom attributes to base select
19+
* Applies filters by custom attributes to base select.
2120
*
2221
* @deprecated CatalogSearch will be removed in 2.4, and {@see \Magento\ElasticSearch}
2322
* will replace it as the default search engine.
@@ -74,13 +73,13 @@ public function __construct(
7473
* Applies filters by custom attributes to base select
7574
*
7675
* @param Select $select
77-
* @param FilterInterface[] ...$filters
76+
* @param FilterInterface[] $filters
7877
* @return Select
7978
* @throws \Magento\Framework\Exception\LocalizedException
8079
* @throws \InvalidArgumentException
8180
* @throws \DomainException
8281
*/
83-
public function apply(Select $select, FilterInterface ... $filters)
82+
public function apply(Select $select, FilterInterface ...$filters)
8483
{
8584
$select = clone $select;
8685
$mainTableAlias = $this->extractTableAliasFromSelect($select);
@@ -144,7 +143,6 @@ private function getJoinConditions($attrId, $mainTable, $joinTable)
144143
{
145144
return [
146145
sprintf('`%s`.`entity_id` = `%s`.`entity_id`', $mainTable, $joinTable),
147-
sprintf('`%s`.`source_id` = `%s`.`source_id`', $mainTable, $joinTable),
148146
$this->conditionManager->generateCondition(
149147
sprintf('%s.attribute_id', $joinTable),
150148
'=',

dev/tests/integration/testsuite/Magento/CatalogSearch/Model/Search/FilterMapper/CustomAttributeFilterTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ private function getSqlForOneAttributeSearch()
155155

156156
$joinConditions = [
157157
'`some_index`.`entity_id` = `field1_filter`.`entity_id`',
158-
'`some_index`.`source_id` = `field1_filter`.`source_id`',
159158
sprintf('`field1_filter`.`attribute_id` = %s', $firstAttribute->getId()),
160159
sprintf('`field1_filter`.`store_id` = %s', (int) $this->storeManager->getStore()->getId())
161160
];
@@ -182,14 +181,12 @@ private function getSqlForTwoAttributeSearch()
182181

183182
$joinConditions1 = [
184183
'`some_index`.`entity_id` = `field1_filter`.`entity_id`',
185-
'`some_index`.`source_id` = `field1_filter`.`source_id`',
186184
sprintf('`field1_filter`.`attribute_id` = %s', $firstAttribute->getId()),
187185
sprintf('`field1_filter`.`store_id` = %s', (int) $this->storeManager->getStore()->getId())
188186
];
189187

190188
$joinConditions2 = [
191189
'`some_index`.`entity_id` = `field2_filter`.`entity_id`',
192-
'`some_index`.`source_id` = `field2_filter`.`source_id`',
193190
sprintf('`field2_filter`.`attribute_id` = %s', $secondAttribute->getId()),
194191
sprintf('`field2_filter`.`store_id` = %s', (int) $this->storeManager->getStore()->getId())
195192
];

0 commit comments

Comments
 (0)