From commits-return-9723-apmail-allura-commits-archive=allura.apache.org@allura.apache.org Wed May 14 23:41:45 2014 Return-Path: X-Original-To: apmail-allura-commits-archive@www.apache.org Delivered-To: apmail-allura-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 07D6F11A0B for ; Wed, 14 May 2014 23:41:45 +0000 (UTC) Received: (qmail 36975 invoked by uid 500); 10 May 2014 22:00:42 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 8229 invoked by uid 500); 10 May 2014 21:58:40 -0000 Mailing-List: contact commits-help@allura.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@allura.apache.org Delivered-To: mailing list commits@allura.apache.org Received: (qmail 62945 invoked by uid 99); 10 May 2014 21:56:24 -0000 Received: from Unknown (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 May 2014 21:56:24 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 9E44E98626D; Fri, 9 May 2014 21:42:21 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: brondsem@apache.org To: commits@allura.apache.org Date: Fri, 09 May 2014 21:42:32 -0000 Message-Id: In-Reply-To: <7761291de58f43ec96c9970608d8a3b9@git.apache.org> References: <7761291de58f43ec96c9970608d8a3b9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [12/18] git commit: [#7257] ticket:562 Changed solr fields for Project model [#7257] ticket:562 Changed solr fields for Project model Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/828a5e82 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/828a5e82 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/828a5e82 Branch: refs/heads/db/7257 Commit: 828a5e82da81b729be98ab5034fc8cb51268703f Parents: 440220e Author: Ferens Dmitriy Authored: Wed Apr 16 17:41:41 2014 +0300 Committer: Dave Brondsema Committed: Fri May 9 18:56:48 2014 +0000 ---------------------------------------------------------------------- Allura/allura/model/project.py | 6 ++++-- Allura/allura/model/session.py | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/828a5e82/Allura/allura/model/project.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py index e0ffec4..8d62699 100644 --- a/Allura/allura/model/project.py +++ b/Allura/allura/model/project.py @@ -1001,21 +1001,23 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject): def index(self): provider = plugin.ProjectRegistrationProvider.get() fields = dict(id=self.index_id(), - title='Project %s' % self._id, + title='Project %s' % self.name, type_s=self.type_s, deleted_b=self.deleted, # Not analyzed fields + private_b=self.private, category_id_s=str(self.category_id), neighborhood_id_s=str(self.neighborhood_id), + url_s=h.absurl(self.url()), created_dt=self._id.generation_time, last_updated_dt=self.last_updated, removal_changed_date_dt=self.removal_changed_date, # Analyzed fields name_t=self.name, shortname_t=self.shortname, + short_description_t=self.short_description, labels_t=' '.join(self.labels), summary_t=self.summary, - description_t=self.description, neighborhood_name_t=self.neighborhood.name) if self.category: fields.update(category_name_t=self.category.name, http://git-wip-us.apache.org/repos/asf/allura/blob/828a5e82/Allura/allura/model/session.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/session.py b/Allura/allura/model/session.py index 0feb938..7a2c2a4 100644 --- a/Allura/allura/model/session.py +++ b/Allura/allura/model/session.py @@ -129,9 +129,8 @@ class ArtifactSessionExtension(ManagedSessionExtension): g.zarkov_event('modify', extra=obj.index_id()) for obj in self.objects_deleted: g.zarkov_event('delete', extra=obj.index_id()) - self.objects_added = [] - self.objects_modified = [] - self.objects_deleted = [] + + super(ArtifactSessionExtension, self).after_flush(obj) def update_index(self, objects_deleted, arefs): # Post delete and add indexing operations