code: def _addIndex(catalog, index, indextype):
      
      if index not in catalog.indexes():
          try:
              if indextype == 'ZCTextIndex':
                  addZCTextIndex(catalog, index)
              else:
                  catalog.addIndex(index, indextype)
              logger.info('Catalog index %s added to %s.' % (index, catalog.id))
              return True
          except:
              logger.error(
                  'Catalog index %s error while adding to %s.'
                  % (index, catalog.id))
      return False
docs: This function indexes the index element into the catalog if it isn't yet.
      :catalog: a catalog object
      :index: an index id as string
      :indextype: the type of the index as string
      :returns: a boolean as True if the element has been indexed and it returns
      False otherwise.