Commit 0e60f9e3 authored by Aurel's avatar Aurel

explicitely defined a group_id when reindexing object with a

sql_catalog_id defined, this is useful for hot reidexing


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14978 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0dbf0918
......@@ -2209,11 +2209,20 @@ class Base( CopyContainer,
# immediateReindexObject.
# Do not check if root is indexable, it is done into catalogObjectList,
# so we will save time
if activate_kw is None:
activate_kw = {}
if self.isIndexable:
if activate_kw is None:
activate_kw = {}
group_id_list = []
if kw.get("group_id", "") not in ('', None):
group_id_list.append(kw.get("group_id", ""))
if kw.get("sql_catalog_id", "") not in ('', None):
group_id_list.append(kw.get("sql_catalog_id", ""))
group_id = ' '.join(group_id_list)
self.activate(group_method_id='portal_catalog/catalogObjectList',
alternate_method_id='alternateReindexObject',
alternate_method_id='alternateReindexObject',
group_id=group_id,
**activate_kw).immediateReindexObject(**kw)
security.declarePublic('recursiveReindexObject')
......
......@@ -577,9 +577,18 @@ class Folder( CopyContainer, CMFBTreeFolder, Base, FolderMixIn):
if self.isIndexable:
if activate_kw is None:
activate_kw = {}
group_id_list = []
if kw.get("group_id", "") not in ('', None):
group_id_list.append(kw.get("group_id", ""))
if kw.get("sql_catalog_id", "") not in ('', None):
group_id_list.append(kw.get("sql_catalog_id", ""))
group_id = ' '.join(group_id_list)
self.activate(group_method_id='portal_catalog/catalogObjectList',
expand_method_id='getIndexableChildValueList',
alternate_method_id='alternateReindexObject',
group_id=group_id,
**activate_kw).recursiveImmediateReindexObject(**kw)
security.declareProtected( Permissions.AccessContentsInformation,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment