PHRAS-714_thesaurus_indexation

- new : if the thesaurus has been modified since it's last indexation, it will be re-indexed as soon a record is to be indexed.
 - nb : after thesaurus modification, the databox MUST be manually re-indexed (which will reindex the thesaurus before)
 - todo : remove useless dialog boxes from thesaurus app (... "this term was..."  "...add with/out reindexing ?..."). To be done in the future app using future routes.
This commit is contained in:
Jean-Yves Gaulier
2016-10-12 18:42:16 +02:00
parent 15d5780201
commit cf40c99ea7
9 changed files with 162 additions and 121 deletions

View File

@@ -59,8 +59,13 @@ class IndexPopulateCommand extends Command
throw new \RuntimeException("Could not provide --thesaurus and --records option at the same time.");
}
$databoxes = $input->getOption('databox_id');
$databoxes_id = $input->getOption('databox_id');
$this->container['elasticsearch.indexer']->populateIndex($what, $databoxes);
$app = $this->container;
foreach($app->getDataboxes() as $databox) {
if(!$databoxes_id || in_array($databox->get_sbas_id(), $databoxes_id)) {
$this->container['elasticsearch.indexer']->populateIndex($what, $databox);
}
}
}
}