Include content links in indexes updates
authorThierry Florac <thierry.florac@onf.fr>
Wed, 27 Jun 2018 15:52:44 +0200
changeset 763 be9a6c93f41e
parent 762 2df58f4a11df
child 764 18c0fbfecaf3
Include content links in indexes updates
src/pyams_content/site.py
--- a/src/pyams_content/site.py	Wed Jun 27 15:33:12 2018 +0200
+++ b/src/pyams_content/site.py	Wed Jun 27 15:52:44 2018 +0200
@@ -19,6 +19,7 @@
 # import interfaces
 from hypatia.interfaces import ICatalog
 from pyams_content.shared.common.interfaces import IWfSharedContent
+from pyams_content.shared.site.interfaces import IContentLink
 from zope.intid.interfaces import IIntIds
 
 # import packages
@@ -38,6 +39,9 @@
             for document in find_objects_providing(application, IWfSharedContent):
                 print("Indexing: {0!r}".format(document))
                 catalog.reindex_doc(intids.register(document), document)
+            for document in find_objects_providing(application, IContentLink):
+                print("Indexing: {0!r}".format(document))
+                catalog.reindex_doc(intids.register(document), document)
         finally:
             set_local_registry(None)
         transaction.commit()