Skip to content

Commit 724ec25

Browse files
authored
Merge pull request #4991 from magento-honey-badgers/MC-21570
[honey] MC-21570: PAT trend build broken on graphql
2 parents dfe4125 + b8c0f89 commit 724ec25

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider/StaticField.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,17 @@ public function getFields(array $context = []): array
132132

133133
if ($attributeAdapter->isTextType()) {
134134
$keywordFieldName = FieldTypeConverterInterface::INTERNAL_DATA_TYPE_KEYWORD;
135+
$index = $this->indexTypeConverter->convert(
136+
IndexTypeConverterInterface::INTERNAL_NO_ANALYZE_VALUE
137+
);
135138
$allAttributes[$fieldName]['fields'][$keywordFieldName] = [
136139
'type' => $this->fieldTypeConverter->convert(
137140
FieldTypeConverterInterface::INTERNAL_DATA_TYPE_KEYWORD
138141
)
139142
];
143+
if ($index) {
144+
$allAttributes[$fieldName]['fields'][$keywordFieldName]['index'] = $index;
145+
}
140146
}
141147

142148
if ($attributeAdapter->isComplexType()) {

app/code/Magento/Elasticsearch/Test/Unit/Model/Adapter/FieldMapper/Product/FieldProvider/StaticFieldTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ public function attributeProvider()
264264
'fields' => [
265265
'keyword' => [
266266
'type' => 'string',
267+
'index' => 'not_analyzed'
267268
]
268269
]
269270
],
@@ -294,6 +295,7 @@ public function attributeProvider()
294295
'fields' => [
295296
'keyword' => [
296297
'type' => 'string',
298+
'index' => 'not_analyzed'
297299
]
298300
]
299301
],

0 commit comments

Comments
 (0)