Remove mapping and setting registries, use the reseter to configure the indexes

This commit is contained in:
ornicar 2011-09-12 18:28:59 +02:00
commit 451a5b4fc2
7 changed files with 40 additions and 160 deletions

View file

@ -32,17 +32,16 @@ class PopulateCommand extends ContainerAwareCommand
$output->writeln('Reseting indexes');
$this->getContainer()->get('foq_elastica.reseter')->reset();
$output->writeln('Applying index settings');
$this->getContainer()->get('foq_elastica.setting_registry')->applySettings();
$output->writeln('Applying type mappings');
$this->getContainer()->get('foq_elastica.mapping_registry')->applyMappings();
$output->writeln('Populating indexes');
$this->getContainer()->get('foq_elastica.populator')->populate(function($text) use ($output) {
$output->writeLn($text);
});
$output->writeln('Refreshing indexes');
array_map(function($index) {
$index->refresh();
}, $this->getContainer()->get('foq_elastica.index_manager')->getAllIndexes());
$output->writeln('Done');
}
}