Remove mapping and setting registries, use the reseter to configure the indexes
This commit is contained in:
parent
e83a3344e9
commit
451a5b4fc2
7 changed files with 40 additions and 160 deletions
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue