# HG changeset patch # User Adrien Di Mascio # Date 1341558032 -7200 # Node ID cc83a3f16c0f178f19e31fcc720919e7914d8524 # Parent c5fff93d3a1c5ffdb35d643b9d0d1d678a5f0e27 [fti] make db-rebuild-fti accept etypes on command line (closes #2410508) diff -r c5fff93d3a1c -r cc83a3f16c0f server/serverctl.py --- a/server/serverctl.py Fri Jul 06 09:00:30 2012 +0200 +++ b/server/serverctl.py Fri Jul 06 09:00:32 2012 +0200 @@ -993,20 +993,24 @@ class RebuildFTICommand(Command): """Rebuild the full-text index of the system database of an instance. - + [etype(s)] the identifier of the instance to rebuild + + If no etype is specified, cubicweb will reindex everything, otherwise + only specified etypes will be considered. """ name = 'db-rebuild-fti' arguments = '' - min_args = max_args = 1 + min_args = 1 def run(self, args): from cubicweb.server.checkintegrity import reindex_entities - appid = args[0] + appid = args.pop(0) + etypes = args or None config = ServerConfiguration.config_for(appid) repo, cnx = repo_cnx(config) session = repo._get_session(cnx.sessionid, setcnxset=True) - reindex_entities(repo.schema, session) + reindex_entities(repo.schema, session, etypes=etypes) cnx.commit()