hooks/syncschema.py
changeset 5556 9ab2b4c74baf
parent 5426 0d4853a6e5ee
child 5558 afd1face1faf
equal deleted inserted replaced
5555:a64f48dd5fe4 5556:9ab2b4c74baf
  1173             self.info('Reindexing full text index for %i entity of type %s',
  1173             self.info('Reindexing full text index for %i entity of type %s',
  1174                       len(rset), etype)
  1174                       len(rset), etype)
  1175             still_fti = list(schema[etype].indexable_attributes())
  1175             still_fti = list(schema[etype].indexable_attributes())
  1176             for entity in rset.entities():
  1176             for entity in rset.entities():
  1177                 source.fti_unindex_entity(session, entity.eid)
  1177                 source.fti_unindex_entity(session, entity.eid)
  1178                 for container in entity.fti_containers():
  1178                 for container in entity.cw_adapt_to('IFTIndexable').fti_containers():
  1179                     if still_fti or container is not entity:
  1179                     if still_fti or container is not entity:
  1180                         source.fti_unindex_entity(session, entity.eid)
  1180                         source.fti_unindex_entity(session, entity.eid)
  1181                         source.fti_index_entity(session, container)
  1181                         source.fti_index_entity(session, container)
  1182         if len(to_reindex):
  1182         if len(to_reindex):
  1183             # Transaction have already been committed
  1183             # Transaction have already been committed