Skip to content

Commit 8f34f94

Browse files
authored
Merge pull request #5 from Spameri/migrate-command
Fixes
2 parents 53c0141 + 1abc1ca commit 8f34f94

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

src/Commands/CreateIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function execute(
7373
}
7474

7575
} else {
76-
foreach ($this->entities as $entity) {
76+
foreach ($this->entities as $entityName => $entity) {
7777
if ($forcedDelete) {
7878
$this->elasticMapper->deleteIndex($entity['index']);
7979
$output->writeln('Index ' . $this->entities[$entityName]['index'] . ' deleted.');

src/Commands/TypeToNewIndex.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function configure() : void
3434
->addArgument('indexTo', \Symfony\Component\Console\Input\InputArgument::REQUIRED)
3535
->addArgument('aliasTo', \Symfony\Component\Console\Input\InputArgument::REQUIRED)
3636
->addArgument('typeTo', \Symfony\Component\Console\Input\InputArgument::OPTIONAL, 'Use only on old ElasticSearch', NULL)
37-
->addOption('allowClose', 'c', NULL,
37+
->addOption('allowClose', 'c', \Symfony\Component\Console\Input\InputOption::VALUE_OPTIONAL,
3838
'Allows command to close index for data transfer. After data is transferred index is opened and resumes normal operations. When open it needs to check changed files after move and sync remaining.',
3939
TRUE
4040
)

src/Config/Elastic.neon

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ services:
3232
delete:
3333
class: Spameri\Elastic\Model\Delete
3434

35+
aggregate:
36+
class: Spameri\Elastic\Model\Aggregate
37+
3538
deleteMultiple:
3639
class: Spameri\Elastic\Model\DeleteMultiple
3740

0 commit comments

Comments
 (0)