mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-15 14:03:27 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user