public static function printResult(
        OutputInterface $output,
        Result $result
    ) {
        self::printInfoMessage(
            $output,
            'Number of resources in index',
            $result->getTotalItems()
        );

        self::printInfoMessage(
            $output,
            'Number of hits',
            $result->getTotalHits()
        );

        $output->writeln('');

        foreach ($result->getItems() as $item) {
            $firstStringPosition = array_reduce($item->getAllMetadata(), function ($carry, $element) {
                return is_string($carry)
                    ? $carry
                    : (
                    is_string($element)
                        ? $element
                        : null
                    );
            }, null);

            self::printInfoMessage(
                $output,
                'x',
                sprintf('%s - %s',
                    $item->getUUID()->composeUUID(),
                    substr((string) $firstStringPosition, 0, 50)
                )
            );
        }
    }