Skip to content

Commit 5d43743

Browse files
committed
ACP2E-2757: Products not showing on category and search but direct links are working
- Adding price_mapping regular expression
1 parent 9846306 commit 5d43743

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/OpenSearch/Model/Adapter/DynamicTemplates/PriceMapper.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public function processTemplates(array $templates): array
1919
{
2020
$templates[] = [
2121
'price_mapping' => [
22-
'match' => 'price_*',
22+
"match_pattern" => "regex",
23+
'match' => 'price_\\d+_\\d+',
2324
'match_mapping_type' => 'string',
2425
'mapping' => [
2526
'type' => 'double',

app/code/Magento/OpenSearch/Test/Unit/Model/OpenSearchTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ public function testAddFieldsMapping()
147147
'dynamic_templates' => [
148148
[
149149
'price_mapping' => [
150-
'match' => 'price_*',
150+
"match_pattern" => "regex",
151+
'match' => 'price_\\d+_\\d+',
151152
'match_mapping_type' => 'string',
152153
'mapping' => [
153154
'type' => 'double',

0 commit comments

Comments
 (0)