Complete index creator command

This commit is contained in:
ornicar 2011-04-11 19:25:04 -07:00
parent a0c2d61ff0
commit c128fac685

View file

@ -26,8 +26,10 @@ class CreateIndexesCommand extends BaseCommand
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
foreach ($this->container->get('foq_elastica.index_manager')->getAllIndexes() as $index) {
foreach ($this->container->get('foq_elastica.index_manager')->getAllIndexes() as $name => $index) {
$output->writeLn(sprintf('Reset index "%s"', $name));
$index->delete();
$index->create();
}
}
}