equal
deleted
inserted
replaced
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 for fti_rql in etype_class.cw_fti_index_rql_queries(cnx): |
127 queries = list(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)) |
128 rset = cnx.execute(fti_rql) |
131 rset = cnx.execute(fti_rql) |
129 source.fti_index_entities(cnx, rset.entities()) |
132 source.fti_index_entities(cnx, rset.entities()) |
130 # clear entity cache to avoid high memory consumption on big tables |
133 # clear entity cache to avoid high memory consumption on big tables |
131 cnx.drop_entity_cache() |
134 cnx.drop_entity_cache() |
132 if withpb: |
135 if withpb: |