hooks/syncschema.py
changeset 10250 582301c2c8ca
parent 10201 989bbadbcd8d
child 10445 f1773842077d
--- 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