Skip to content

Commit b98bee8

Browse files
committed
Merge remote-tracking branch 'tango/MC-20381' into Chaika-PR-2019-09-26
2 parents acae330 + 4844c67 commit b98bee8

File tree

1 file changed

+6
-5
lines changed
  • app/code/Magento/Elasticsearch/SearchAdapter/Query/Builder

1 file changed

+6
-5
lines changed

app/code/Magento/Elasticsearch/SearchAdapter/Query/Builder/Match.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,12 @@ protected function buildQueries(array $matches, array $queryValue)
138138

139139
$transformedTypes = [];
140140
foreach ($matches as $match) {
141-
$attributeAdapter = $this->attributeProvider->getByAttributeCode($match['field']);
141+
$resolvedField = $this->fieldMapper->getFieldName(
142+
$match['field'],
143+
['type' => FieldMapperInterface::TYPE_QUERY]
144+
);
145+
146+
$attributeAdapter = $this->attributeProvider->getByAttributeCode($resolvedField);
142147
$fieldType = $this->fieldTypeResolver->getFieldType($attributeAdapter);
143148
$valueTransformer = $this->valueTransformerPool->get($fieldType ?? 'text');
144149
$valueTransformerHash = \spl_object_hash($valueTransformer);
@@ -151,10 +156,6 @@ protected function buildQueries(array $matches, array $queryValue)
151156
continue;
152157
}
153158

154-
$resolvedField = $this->fieldMapper->getFieldName(
155-
$match['field'],
156-
['type' => FieldMapperInterface::TYPE_QUERY]
157-
);
158159
$conditions[] = [
159160
'condition' => $queryValue['condition'],
160161
'body' => [

0 commit comments

Comments
 (0)