# HG changeset patch # User Sylvain Thénault # Date 1267806241 -3600 # Node ID c02583cb80a91af22d0c4c14eb93ee60acd3e6dd # Parent 4ee224c4c41d02e9a5ef8e160bc0751825013a7d repair stuff broken by fti handling changes diff -r 4ee224c4c41d -r c02583cb80a9 server/checkintegrity.py --- a/server/checkintegrity.py Fri Mar 05 17:22:41 2010 +0100 +++ b/server/checkintegrity.py Fri Mar 05 17:24:01 2010 +0100 @@ -68,7 +68,6 @@ """reindex all entities in the repository""" # deactivate modification_date hook since we don't want them # to be updated due to the reindexation - from cubicweb.server.repository import FTIndexEntityOp repo = session.repo cursor = session.pool['system'] if not repo.system_source.indexer.has_fti_table(cursor): @@ -104,9 +103,11 @@ pb.update() # reindex entities by generating rql queries which set all indexable # attribute to their current value + source = repo.system_source for eschema in etypes: for entity in session.execute('Any X WHERE X is %s' % eschema).entities(): - FTIndexEntityOp(session, entity=entity) + source.fti_unindex_entity(session, entity.eid) + source.fti_index_entity(session, entity) if withpb: pb.update() # restore Entity.check diff -r 4ee224c4c41d -r c02583cb80a9 server/sources/pyrorql.py --- a/server/sources/pyrorql.py Fri Mar 05 17:22:41 2010 +0100 +++ b/server/sources/pyrorql.py Fri Mar 05 17:24:01 2010 +0100 @@ -182,6 +182,7 @@ self._query_cache.clear() repo = self.repo session = repo.internal_session() + source = repo.system_source try: for etype, extid in modified: try: @@ -191,7 +192,7 @@ rset = session.eid_rset(eid, etype) entity = rset.get_entity(0, 0) entity.complete(entity.e_schema.indexable_attributes()) - repo.index_entity(session, entity) + source.index_entity(session, entity) except: self.exception('while updating %s with external id %s of source %s', etype, extid, self.uri)