server/checkintegrity.py
changeset 10846 d186820c5f7a
parent 10840 5669e136860b
child 10847 ce5403611cbe
equal deleted inserted replaced
10845:75c60e58ce6b 10846:d186820c5f7a
   122     # reindex entities by generating rql queries which set all indexable
   122     # reindex entities by generating rql queries which set all indexable
   123     # attribute to their current value
   123     # attribute to their current value
   124     source = repo.system_source
   124     source = repo.system_source
   125     for eschema in etypes:
   125     for eschema in etypes:
   126         etype_class = cnx.vreg['etypes'].etype_class(str(eschema))
   126         etype_class = cnx.vreg['etypes'].etype_class(str(eschema))
   127         queries = list(etype_class.cw_fti_index_rql_queries(cnx))
   127         for fti_rql in etype_class.cw_fti_index_rql_queries(cnx):
   128         for i, fti_rql in enumerate(queries):
       
   129             if withpb:
       
   130                 pb.text = "%s: %s%%" % (str(eschema), i * 100 / len(queries))
       
   131             rset = cnx.execute(fti_rql)
   128             rset = cnx.execute(fti_rql)
   132             source.fti_index_entities(cnx, rset.entities())
   129             source.fti_index_entities(cnx, rset.entities())
   133             # clear entity cache to avoid high memory consumption on big tables
   130             # clear entity cache to avoid high memory consumption on big tables
   134             cnx.drop_entity_cache()
   131             cnx.drop_entity_cache()
   135         if withpb:
   132         if withpb: