public function initialize(InputInterface $input, OutputInterface $output)
{
parent::initialize($input, $output);
$this->logger = $this->getContainer()->get('logger');
$this->searchHandler = $this->getContainer()->get('ezpublish.spi.search');
$this->persistenceHandler = $this->getContainer()->get('ezpublish.api.persistence_handler');
$this->databaseHandler = $this->getContainer()->get('ezpublish.connection');
if (!$this->searchHandler instanceof SearchHandler) {
throw new RuntimeException('Expected to find Legacy Search Engine but found something else.' . "Did you forget to configure the repository with 'legacy' search engine?");
}
}