equal
deleted
inserted
replaced
132 pb.update() |
132 pb.update() |
133 # reindex entities by generating rql queries which set all indexable |
133 # reindex entities by generating rql queries which set all indexable |
134 # attribute to their current value |
134 # attribute to their current value |
135 source = repo.system_source |
135 source = repo.system_source |
136 for eschema in etypes: |
136 for eschema in etypes: |
137 rset = session.execute('Any X WHERE X is %s' % eschema) |
137 etype_class = session.vreg['etypes'].etype_class(str(eschema)) |
138 source.fti_index_entities(session, rset.entities()) |
138 for fti_rql in etype_class.cw_fti_index_rql_queries(session): |
139 # clear entity cache to avoid high memory consumption on big tables |
139 rset = session.execute(fti_rql) |
140 session.drop_entity_cache() |
140 source.fti_index_entities(session, rset.entities()) |
|
141 # clear entity cache to avoid high memory consumption on big tables |
|
142 session.drop_entity_cache() |
141 if withpb: |
143 if withpb: |
142 pb.update() |
144 pb.update() |
143 |
145 |
144 |
146 |
145 def check_schema(schema, session, eids, fix=1): |
147 def check_schema(schema, session, eids, fix=1): |