mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
add more hooks for reindexing documents/folders
This commit is contained in:
parent
3dfcb8d581
commit
921eab9e54
|
@ -13,6 +13,8 @@ function reindexDocumentOrFolderCallback($fulltextservice, $object) {
|
|||
$hit = $lucenesearch->getDocument($object->getId());
|
||||
elseif($object->isType('folder'))
|
||||
$hit = $lucenesearch->getFolder($object->getId());
|
||||
elseif($object->isType('documentcontent'))
|
||||
$hit = $lucenesearch->getDocument($object->getDocument()->getId());
|
||||
if($hit) {
|
||||
$index->reindexDocument($hit->id);
|
||||
$index->commit();
|
||||
|
@ -84,5 +86,8 @@ if($settings->_enableFullSearch) {
|
|||
$dms->addCallback('onPostSetKategories', 'reindexDocumentOrFolderCallback', $fulltextservice);
|
||||
$dms->addCallback('onPostAddKategories', 'reindexDocumentOrFolderCallback', $fulltextservice);
|
||||
$dms->addCallback('onPostRemoveKategories', 'reindexDocumentOrFolderCallback', $fulltextservice);
|
||||
$dms->addCallback('onPostAddAttribute', 'reindexDocumentOrFolderCallback', $fulltextservice);
|
||||
$dms->addCallback('onPostUpdateAttribute', 'reindexDocumentOrFolderCallback', $fulltextservice);
|
||||
$dms->addCallback('onPostRemoveAttribute', 'reindexDocumentOrFolderCallback', $fulltextservice);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user