1 | <?php |
||
24 | class IndexExportCommand extends AbstractManagerAwareCommand |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | protected function configure() |
||
30 | { |
||
31 | parent::configure(); |
||
32 | |||
33 | $this |
||
34 | ->setName('ongr:es:index:export') |
||
35 | ->setDescription('Exports data from elasticsearch index.') |
||
36 | ->addArgument( |
||
37 | 'filename', |
||
38 | InputArgument::REQUIRED, |
||
39 | 'Select file to store output' |
||
40 | )->addOption( |
||
41 | 'types', |
||
42 | null, |
||
43 | InputOption::VALUE_REQUIRED + InputOption::VALUE_IS_ARRAY, |
||
44 | 'Export specific types only' |
||
45 | )->addOption( |
||
46 | 'chunk', |
||
47 | null, |
||
48 | InputOption::VALUE_REQUIRED, |
||
49 | 'Chunk size to use in scan api', |
||
50 | 500 |
||
51 | ); |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | protected function execute(InputInterface $input, OutputInterface $output) |
||
74 | } |
||
75 |