code: def clearFindAndRebuild(self):
          
          def indexObject(obj, path):
              self.reindexObject(obj)
              self.counter += 1
              if self.counter % 100 == 0:
                  logger.info('Progress: {} objects have been cataloged for {}.'
                              .format(self.counter, self.id))
  
          logger.info('Cleaning and rebuilding %s...' % self.id)
          try:
              at = getToolByName(self, 'archetype_tool')
              types = [k for k, v in at.catalog_map.items()
                       if self.id in v]
              self.counter = 0
              self.manage_catalogClear()
              portal = getToolByName(self, 'portal_url').getPortalObject()
              portal.ZopeFindAndApply(portal,
                                      obj_metatypes=types,
                                      search_sub=True,
                                      apply_func=indexObject)
          except:
              logger.error(traceback.format_exc())
              e = sys.exc_info()
              logger.error(
                  "Unable to clean and rebuild %s due to: %s" % (self.id, e))
          logger.info('%s cleaned and rebuilt' % self.id)
docs: Empties catalog, then finds all contentish objects (i.e. objects
             with an indexObject method), and reindexes them.
             This may take a long time.