Files

35 lines
739 B
PHP

<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Magento\OpenSearch\Model\Adapter\DynamicTemplates;
/**
* @inheritDoc
*/
class StringMapper implements MapperInterface
{
/**
* @inheritDoc
*/
public function processTemplates(array $templates): array
{
$templates[] = [
'string_mapping' => [
'match' => '*',
'match_mapping_type' => 'string',
'mapping' => [
'type' => 'text',
'index' => true,
'copy_to' => '_search',
],
],
];
return $templates;
}
}