reindex document after editing it

This commit is contained in:
Uwe Steinmann 2020-12-10 13:47:00 +01:00
parent 063b950b3a
commit 19bb70af40

View File

@ -26,6 +26,7 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common {
$dms = $this->params['dms'];
$user = $this->params['user'];
$settings = $this->params['settings'];
$fulltextservice = $this->params['fulltextservice'];
$document = $this->params['document'];
$name = $this->params['name'];
@ -156,6 +157,14 @@ class SeedDMS_Controller_EditDocument extends SeedDMS_Controller_Common {
}
}
if($fulltextservice && ($index = $fulltextservice->Indexer()) && $document) {
$idoc = $fulltextservice->IndexedDocument($document);
if(false !== $this->callHook('preIndexDocument', $document, $idoc)) {
$index->addDocument($idoc);
$index->commit();
}
}
if(!$this->callHook('postEditDocument')) {
}