Hi everyone!
Found some bug with search indexing for custom single/multi selection fields in core.
Scenario:
Added the new field to Article’s attributes, let’s say “Country” (type: MULTI SELECTION, Entity: Country - Shopware\Models\Country\Country)
The new Field added to search index by custom “SearchTermQueryBuilder”
public function buildQuery(ShopContextInterface $context, $term)
{
$query = $this->decoratedQueryBuilder->buildQuery($context, $term);
$matchQuery = new MultiMatchQuery(['attributes.core.countries'], $term);
$query->add($matchQuery, BoolQuery::SHOULD);
return $query;
}
Result:
In Article details template avaibale only string with keys: countries = " |2|3|4|"
ProductProvider also got |2|3|4| in Article structure, and this wrong data transfered to Search index.
Expected: countries = “value value value-n …”
Does it possible transfer to search index content, not just KEYs from referenced Models?
Many thanks and have a good day.