Classes/Command/NodeIndexCommandController.php
public function showMappingCommand(): void
    {
        $nodeTypeMappingCollection = $this->nodeTypeMappingBuilder->buildMappingInformation($this->nodeIndexer->getIndex());
        foreach ($nodeTypeMappingCollection as $mapping) {
            /** @var Mapping $mapping */
            $this->output(Yaml::dump($mapping->asArray(), 5, 2));
            $this->outputLine();
        }
        $this->outputLine('------------');

        $mappingErrors = $this->nodeTypeMappingBuilder->getLastMappingErrors();
        if ($mappingErrors->hasErrors()) {
            $this->outputLine('<b>Mapping Errors</b>');
            foreach ($mappingErrors->getFlattenedErrors() as $errors) {
                foreach ($errors as $error) {
                    $this->outputLine($error);
                }
            }
        }

        if ($mappingErrors->hasWarnings()) {
            $this->outputLine('<b>Mapping Warnings</b>');
            foreach ($mappingErrors->getFlattenedWarnings() as $warnings) {
                foreach ($warnings as $warning) {
                    $this->outputLine($warning);
                }
            }
        }
    }
public function showMappingCommand(): void
    {
        $nodeTypeMappingCollection = $this->nodeTypeMappingBuilder->buildMappingInformation($this->nodeIndexer->getIndex());
        foreach ($nodeTypeMappingCollection as $mapping) {
            /** @var Mapping $mapping */
            $this->output(Yaml::dump($mapping->asArray(), 5, 2));
            $this->outputLine();
        }
        $this->outputLine('------------');

        $mappingErrors = $this->nodeTypeMappingBuilder->getLastMappingErrors();
        if ($mappingErrors->hasErrors()) {
            $this->outputLine('<b>Mapping Errors</b>');
            foreach ($mappingErrors->getFlattenedErrors() as $errors) {
                foreach ($errors as $error) {
                    $this->outputLine($error);
                }
            }
        }

        if ($mappingErrors->hasWarnings()) {
            $this->outputLine('<b>Mapping Warnings</b>');
            foreach ($mappingErrors->getFlattenedWarnings() as $warnings) {
                foreach ($warnings as $warning) {
                    $this->outputLine($warning);
                }
            }
        }
    }
public function showMappingCommand ( ) : void { $ nodeTypeMappingCollection = $ this -> nodeTypeMappingBuilder -> buildMappingInformation ( $ this -> nodeIndexer -> getIndex ( ) ) ; foreach ( $ nodeTypeMappingCollection as $ mapping ) { /** @var Mapping $mapping */ $ this -> output ( Yaml :: dump ( $ mapping -> asArray ( ) , 5 , 2 ) ) ; $ this -> outputLine ( ) ; } $ this -> outputLine ( '------------' ) ; $ mappingErrors = $ this -> nodeTypeMappingBuilder -> getLastMappingErrors ( ) ; if ( $ mappingErrors -> hasErrors ( ) ) { $ this -> outputLine ( '<b>Mapping Errors</b>' ) ; foreach ( $ mappingErrors -> getFlattenedErrors ( ) as $ errors ) { foreach ( $ errors as $ error ) { $ this -> outputLine ( $ error ) ; } } } if ( $ mappingErrors -> hasWarnings ( ) ) { $ this -> outputLine ( '<b>Mapping Warnings</b>' ) ; foreach ( $ mappingErrors -> getFlattenedWarnings ( ) as $ warnings ) { foreach ( $ warnings as $ warning ) { $ this -> outputLine ( $ warning ) ; } } } }
Show the mapping which would be sent to the ElasticSearch server

@return void
@throws CRAException
Show the mapping which would be sent to the ElasticSearch server