mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 17:27:36 +00:00
35 lines
739 B
PHP
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;
|
|
}
|
|
}
|