public function getClientMapping(array $bundles)
    {
        /** @var array $typesMapping Array of filtered mappings for the elasticsearch client*/
        $typesMapping = null;

        /** @var array $mappings All mapping info */
        $mappings = $this->getMappings($bundles);

        foreach ($mappings as $type => $mapping) {
            if (!empty($mapping['properties'])) {
                $typesMapping[$type] = array_filter(
                    array_merge(
                        ['properties' => $mapping['properties']],
                        $mapping['fields']
                    ),
                    function ($value) {
                        return (bool)$value || is_bool($value);
                    }
                );
            }
        }

        return $typesMapping;
    }
public function getClientMapping(array $bundles)
    {
        /** @var array $typesMapping Array of filtered mappings for the elasticsearch client*/
        $typesMapping = null;

        /** @var array $mappings All mapping info */
        $mappings = $this->getMappings($bundles);

        foreach ($mappings as $type => $mapping) {
            if (!empty($mapping['properties'])) {
                $typesMapping[$type] = array_filter(
                    array_merge(
                        ['properties' => $mapping['properties']],
                        $mapping['fields']
                    ),
                    function ($value) {
                        return (bool)$value || is_bool($value);
                    }
                );
            }
        }

        return $typesMapping;
    }
public function getClientMapping ( array $ bundles ) { /** @var array $typesMapping Array of filtered mappings for the elasticsearch client*/ $ typesMapping = null ; /** @var array $mappings All mapping info */ $ mappings = $ this -> getMappings ( $ bundles ) ; foreach ( $ mappings as $ type => $ mapping ) { if ( ! empty ( $ mapping [ 'properties' ] ) ) { $ typesMapping [ $ type ] = array_filter ( array_merge ( [ 'properties' => $ mapping [ 'properties' ] ] , $ mapping [ 'fields' ] ) , function ( $ value ) { return ( bool ) $ value || is_bool ( $ value ) ; } ) ; } } return $ typesMapping ; }
Retrieves prepared mapping to sent to the elasticsearch client.

@param array $bundles Manager config.

@return array|null
Retrieves prepared mapping to sent to the elasticsearch client .