# HG changeset patch # User David Douard # Date 1513124619 -3600 # Node ID 2b049c9fcec53ed3e1db622f83dba548116a0bd5 # Parent b86214011758391495230cf944ceb500f1b8c1cd [source/native] do NOT do anything with fti if do_fti is False ensure no fti related process is done when fti is disabled on a db source. diff -r b86214011758 -r 2b049c9fcec5 cubicweb/server/sources/native.py --- a/cubicweb/server/sources/native.py Thu Apr 19 15:55:33 2018 +0200 +++ b/cubicweb/server/sources/native.py Wed Dec 13 01:23:39 2017 +0100 @@ -1261,6 +1261,8 @@ def fti_unindex_entities(self, cnx, entities): """remove text content for entities from the full text index """ + if not cnx.repo.system_source.do_fti: + return cursor = cnx.cnxset.cu cursor_unindex_object = self.dbhelper.cursor_unindex_object try: @@ -1272,6 +1274,8 @@ def fti_index_entities(self, cnx, entities): """add text content of created/modified entities to the full text index """ + if not cnx.repo.system_source.do_fti: + return cursor_index_object = self.dbhelper.cursor_index_object cursor = cnx.cnxset.cu try: @@ -1296,6 +1300,8 @@ def precommit_event(self): cnx = self.cnx source = cnx.repo.system_source + if not source.do_fti: + return pendingeids = cnx.transaction_data.get('pendingeids', ()) done = cnx.transaction_data.setdefault('indexedeids', set()) to_reindex = set()