| @@ 20-30 (lines=11) @@ | ||
| 17 | /** |
|
| 18 | * {@inheritdoc} |
|
| 19 | */ |
|
| 20 | protected function configure() |
|
| 21 | { |
|
| 22 | $this |
|
| 23 | ->setName('elasticsearch:alias:add') |
|
| 24 | ->setDescription('Add alias to an index') |
|
| 25 | ->addArgument('index', InputArgument::REQUIRED, 'Which index ?') |
|
| 26 | ->addArgument('alias', InputArgument::REQUIRED, 'Alias name') |
|
| 27 | ->addOption('replace', null, InputOption::VALUE_NONE, 'If set, an existing alias will be replaced') |
|
| 28 | ->addOption('client', null, InputOption::VALUE_REQUIRED, 'Client to use (if not default)', null) |
|
| 29 | ; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * {@inheritdoc} |
|
| @@ 17-27 (lines=11) @@ | ||
| 14 | */ |
|
| 15 | class PutIndexMappingsCommand extends ElasticaAwareCommand |
|
| 16 | { |
|
| 17 | protected function configure() |
|
| 18 | { |
|
| 19 | $this |
|
| 20 | ->setName('elasticsearch:index:put_mappings') |
|
| 21 | ->setDescription('Put index mappings from configuration') |
|
| 22 | ->addArgument('index', InputArgument::REQUIRED, 'Which index ?') |
|
| 23 | ->addArgument('type', InputArgument::REQUIRED, 'Which type ?') |
|
| 24 | ->addOption('client', null, InputOption::VALUE_REQUIRED, 'Client to use (if not default)', null) |
|
| 25 | ->addOption('alias', null, InputOption::VALUE_REQUIRED, 'Index configuration to use (if not the same as index argument)', null) |
|
| 26 | ; |
|
| 27 | } |
|
| 28 | ||
| 29 | protected function execute(InputInterface $input, OutputInterface $output) |
|
| 30 | { |
|