private function getMappingFields($indexName, $typeConfigData)
    {
        \Magento\Framework\Profiler::start('ES:Get dynamic fields config');
        $fields = $this->getDynamicFields($indexName, $typeConfigData);
        \Magento\Framework\Profiler::stop('ES:Get dynamic fields config');

        foreach ($typeConfigData['mapping']['staticFields'] as $fieldName => $fieldConfig) {
            $field = $this->mappingFieldFactory->create(['name' => $fieldName] + $fieldConfig);

            if (isset($fields[$fieldName])) {
                // Field also exists with dynamic providers.
                // We merge the dynamic config and the config coming from configuration file.
                // XML file has precedence.
                $field = $fields[$fieldName]->mergeConfig($fieldConfig['fieldConfig'] ?? []);
            }

            $fields[$fieldName] = $field;
        }

        return $fields;
    }
private function getMappingFields($indexName, $typeConfigData)
    {
        \Magento\Framework\Profiler::start('ES:Get dynamic fields config');
        $fields = $this->getDynamicFields($indexName, $typeConfigData);
        \Magento\Framework\Profiler::stop('ES:Get dynamic fields config');

        foreach ($typeConfigData['mapping']['staticFields'] as $fieldName => $fieldConfig) {
            $field = $this->mappingFieldFactory->create(['name' => $fieldName] + $fieldConfig);

            if (isset($fields[$fieldName])) {
                // Field also exists with dynamic providers.
                // We merge the dynamic config and the config coming from configuration file.
                // XML file has precedence.
                $field = $fields[$fieldName]->mergeConfig($fieldConfig['fieldConfig'] ?? []);
            }

            $fields[$fieldName] = $field;
        }

        return $fields;
    }
private function getMappingFields ( $ indexName , $ typeConfigData ) { \ Magento \ Framework \ Profiler :: start ( 'ES:Get dynamic fields config' ) ; $ fields = $ this -> getDynamicFields ( $ indexName , $ typeConfigData ) ; \ Magento \ Framework \ Profiler :: stop ( 'ES:Get dynamic fields config' ) ; foreach ( $ typeConfigData [ 'mapping' ] [ 'staticFields' ] as $ fieldName => $ fieldConfig ) { $ field = $ this -> mappingFieldFactory -> create ( [ 'name' => $ fieldName ] + $ fieldConfig ) ; if ( isset ( $ fields [ $ fieldName ] ) ) { // Field also exists with dynamic providers. // We merge the dynamic config and the config coming from configuration file. // XML file has precedence. $ field = $ fields [ $ fieldName ] -> mergeConfig ( $ fieldConfig [ 'fieldConfig' ] ?? [ ] ) ; } $ fields [ $ fieldName ] = $ field ; } return $ fields ; }
Prepare mapping fields by merging static fields with dynamic ones.

@SuppressWarnings(PHPMD.StaticAccess)

@param string $indexName      Index Name.
@param array  $typeConfigData Processed type configuration.

@return \Smile\ElasticsuiteCore\Api\Index\Mapping\FieldInterface[]
Prepare mapping fields by merging static fields with dynamic ones .