1 | <?php |
||
23 | class IndexImportCommand extends AbstractManagerAwareCommand |
||
24 | { |
||
25 | /** |
||
26 | * {@inheritdoc} |
||
27 | */ |
||
28 | protected function configure() |
||
29 | { |
||
30 | parent::configure(); |
||
31 | |||
32 | $this |
||
33 | ->setName('ongr:es:index:import') |
||
34 | ->setDescription('Imports data to elasticsearch index.') |
||
35 | ->addArgument( |
||
36 | 'filename', |
||
37 | InputArgument::REQUIRED, |
||
38 | 'Select file to store output' |
||
39 | ) |
||
40 | ->addOption( |
||
41 | 'bulk-size', |
||
42 | 'b', |
||
43 | InputOption::VALUE_REQUIRED, |
||
44 | 'Set bulk size for import', |
||
45 | 1000 |
||
46 | ) |
||
47 | ->addOption( |
||
48 | 'gzip', |
||
49 | 'z', |
||
50 | InputOption::VALUE_NONE, |
||
51 | 'Import a gzip file' |
||
52 | ); |
||
53 | } |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | protected function execute(InputInterface $input, OutputInterface $output) |
||
80 | } |
||
81 |