diff --git a/Command/PopulateCommand.php b/Command/PopulateCommand.php index 9f66e05..1cd6ea8 100644 --- a/Command/PopulateCommand.php +++ b/Command/PopulateCommand.php @@ -29,9 +29,11 @@ class PopulateCommand extends Command */ protected function execute(InputInterface $input, OutputInterface $output) { - $output->writeln('Populating indexes'); + $output->writeln('Reseting indexes'); + $this->container->get('foq_elastica.reseter')->reset(); - $populator = $this->container->get('foq_elastica.populator')->populate(); + $output->writeln('Populating indexes'); + $this->container->get('foq_elastica.populator')->populate(); $output->writeln('Done'); } diff --git a/Command/ResetCommand.php b/Command/ResetCommand.php deleted file mode 100644 index 0334d8b..0000000 --- a/Command/ResetCommand.php +++ /dev/null @@ -1,35 +0,0 @@ -setName('foq:elastica:reset') - ->setDescription('Recreates all indexes'); - } - - /** - * @see Command - */ - protected function execute(InputInterface $input, OutputInterface $output) - { - $output->writeLn('Reset all indexes'); - - $this->container->get('foq_elastica.reseter')->reset(); - - $output->writeln('Done'); - } -}