public static function makeQueryAndPrintResults(
        InputInterface $input,
        OutputInterface $output,
        callable $makeQuery
    ) {
        $query = $input->getArgument('query');

        self::printInfoMessage(
            $output,
            'Query / Page / Size',
            sprintf('<strong>%s</strong> / %d / %d',
                '' === $query
                    ? '*'
                    : $query,
                $input->getOption('page'),
                $input->getOption('size')
            )
        );

        try {
            $result = $makeQuery(Query::create(
                $input->getArgument('query'),
                (int) $input->getOption('page'),
                (int) $input->getOption('size')
            ));

            self::printResult($output, $result);
        } catch (ResourceNotAvailableException $exception) {
            self::printInfoMessage(
                $output,
                self::getHeader(),
                $output->writeln('Index not found. Skipping.')
            );
        }
    }