public function buildIndexMapping(IndexConfigInterface $indexConfig)
    {
        $typeMappings = [];
        foreach ($indexConfig->getTypes() as $typeConfig) {
            $typeMappings[$typeConfig->getName()] = $this->buildTypeMapping($typeConfig);
        }

        $mapping = [];
        if (!empty($typeMappings)) {
            $mapping['mappings'] = $typeMappings;
        }
        // 'warmers' => $indexConfig->getWarmers(),

        $settings = $indexConfig->getSettings();
        if (!empty($settings)) {
            $mapping['settings'] = $settings;
        }

        return $mapping;
    }
public function buildIndexMapping(IndexConfigInterface $indexConfig)
    {
        $typeMappings = [];
        foreach ($indexConfig->getTypes() as $typeConfig) {
            $typeMappings[$typeConfig->getName()] = $this->buildTypeMapping($typeConfig);
        }

        $mapping = [];
        if (!empty($typeMappings)) {
            $mapping['mappings'] = $typeMappings;
        }
        // 'warmers' => $indexConfig->getWarmers(),

        $settings = $indexConfig->getSettings();
        if (!empty($settings)) {
            $mapping['settings'] = $settings;
        }

        return $mapping;
    }
public function buildIndexMapping ( IndexConfigInterface $ indexConfig ) { $ typeMappings = [ ] ; foreach ( $ indexConfig -> getTypes ( ) as $ typeConfig ) { $ typeMappings [ $ typeConfig -> getName ( ) ] = $ this -> buildTypeMapping ( $ typeConfig ) ; } $ mapping = [ ] ; if ( ! empty ( $ typeMappings ) ) { $ mapping [ 'mappings' ] = $ typeMappings ; } // 'warmers' => $indexConfig->getWarmers(), $ settings = $ indexConfig -> getSettings ( ) ; if ( ! empty ( $ settings ) ) { $ mapping [ 'settings' ] = $ settings ; } return $ mapping ; }
Builds mappings for an entire index.

@param IndexConfigInterface $indexConfig

@return array
Builds mappings for an entire index .