Back to index

plone3  3.1.7
Functions
update_catalogIndexes Namespace Reference

Functions

def update_catalogIndexes

Function Documentation

def update_catalogIndexes.update_catalogIndexes (   self,
  REQUEST 
)
External method to drop, re-add, and rebuild catalog Indexes for migrated 
CMF sites from Zope 2.3 to 2.4+.

Definition at line 3 of file update_catalogIndexes.py.

00003 
00004 def update_catalogIndexes(self, REQUEST):
00005     '''
00006     External method to drop, re-add, and rebuild catalog Indexes for migrated 
00007     CMF sites from Zope 2.3 to 2.4+.
00008     '''
00009     rIndexes = {'allowedRolesAndUsers': 'KeywordIndex'
00010               , 'effective': 'FieldIndex'
00011               , 'expires': 'FieldIndex'}
00012     ct = getToolByName(self, 'portal_catalog')
00013     map(lambda x, ct=ct: ct.delIndex(x), rIndexes.keys())
00014     map(lambda x, ct=ct: ct.addIndex(x[0], x[1]), rIndexes.items()) 
00015     ct.manage_reindexIndex(ids=rIndexes.keys(), REQUEST=REQUEST)
00016     return 'Catalog Indexes rebuilt.'

Here is the call graph for this function: