# HG changeset patch # User Julien Cristau # Date 1423831173 -3600 # Node ID 582301c2c8caf007c677b9a4414d17e7ae9c6ded # Parent e38b8d37c5d8e99d2c06bdbb97db18c44bdea9bb [hooks/syncschema] use a list instead of a set for UpdateFTIndexOp The order in which etypes get indexed matters. Related to #4959402. diff -r e38b8d37c5d8 -r 582301c2c8ca hooks/syncschema.py --- a/hooks/syncschema.py Fri Feb 13 11:48:13 2015 +0100 +++ b/hooks/syncschema.py Fri Feb 13 13:39:33 2015 +0100 @@ -319,8 +319,12 @@ if 'fulltext_container' in self.values: op = UpdateFTIndexOp.get_instance(cnx) for subjtype, objtype in rschema.rdefs: - op.add_data(subjtype) - op.add_data(objtype) + if self.values['fulltext_container'] == 'subject': + op.add_data(subjtype) + op.add_data(objtype) + else: + op.add_data(objtype) + op.add_data(subjtype) # update the in-memory schema first self.oldvalues = dict( (attr, getattr(rschema, attr)) for attr in self.values) self.rschema.__dict__.update(self.values) @@ -1313,6 +1317,7 @@ We wait after the commit to as the schema in memory is only updated after the commit. """ + containercls = list def postcommit_event(self): cnx = self.cnx