Skip to content

Commit 32d4ccc

Browse files
committed
MC-21570: PAT trend build broken on graphql
- Fix keyword index on elasticsearch 2
1 parent 62cd3a1 commit 32d4ccc

File tree

1 file changed

+6
-0
lines changed
  • app/code/Magento/Elasticsearch/Model/Adapter/FieldMapper/Product/FieldProvider

1 file changed

+6
-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()) {

0 commit comments

Comments
 (0)