allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [14/20] git commit: [#7257] ticket:562 Changed solr fields for Project model
Date Wed, 21 May 2014 14:45:02 GMT
[#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/4f08b6c8
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/4f08b6c8
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/4f08b6c8

Branch: refs/heads/master
Commit: 4f08b6c841d8734cb4ff913dfeb1212589468567
Parents: 0c31e06
Author: Ferens Dmitriy <ferensdima@gmail.com>
Authored: Wed Apr 16 17:41:41 2014 +0300
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Wed May 21 14:44:21 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/4f08b6c8/Allura/allura/model/project.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py
index f0eff21..db7d10f 100644
--- a/Allura/allura/model/project.py
+++ b/Allura/allura/model/project.py
@@ -1032,21 +1032,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/4f08b6c8/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


Mime
View raw message