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 BEEA9116E5 for ; Wed, 21 May 2014 14:44:50 +0000 (UTC) Received: (qmail 52494 invoked by uid 500); 21 May 2014 14:44:50 -0000 Delivered-To: apmail-allura-commits-archive@allura.apache.org Received: (qmail 52475 invoked by uid 500); 21 May 2014 14:44:50 -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 52467 invoked by uid 99); 21 May 2014 14:44:50 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 May 2014 14:44:50 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7BA1F99C0CE; Wed, 21 May 2014 14:44:50 +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: Wed, 21 May 2014 14:45:07 -0000 Message-Id: <22db6b6de0ad439093e3e93bf4a01fa7@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [19/20] git commit: [#7257] update fields indexed in solr for projects [#7257] update fields indexed in solr for projects * category_id is very old and not used * use ProjectRegistrationProvider to get project create/register time * add flags for nbhd proj, and root (aka not subproject) * add external homepage * do exact match on project and nbhd names Project: http://git-wip-us.apache.org/repos/asf/allura/repo Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/36627251 Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/36627251 Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/36627251 Branch: refs/heads/master Commit: 3662725158a12f71dca61aee4d36f1170ac06436 Parents: 3760cd9 Author: Dave Brondsema Authored: Fri May 9 19:45:25 2014 +0000 Committer: Dave Brondsema Committed: Wed May 21 14:44:22 2014 +0000 ---------------------------------------------------------------------- Allura/allura/model/project.py | 13 ++++++++----- Allura/allura/tests/model/test_project.py | 1 - 2 files changed, 8 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/allura/blob/36627251/Allura/allura/model/project.py ---------------------------------------------------------------------- diff --git a/Allura/allura/model/project.py b/Allura/allura/model/project.py index 45bb551..b7ab1f7 100644 --- a/Allura/allura/model/project.py +++ b/Allura/allura/model/project.py @@ -1042,19 +1042,22 @@ class Project(SearchIndexable, MappedClass, ActivityNode, ActivityObject): deleted_b=self.deleted, # Not analyzed fields private_b=_private, - category_id_s=str(self.category_id or ''), neighborhood_id_s=str(self.neighborhood_id), url_s=h.absurl(self.url()), - created_dt=self._id.generation_time, + is_root_b=self.is_root, + is_nbhd_project_b=self.is_nbhd_project, + registration_dt=plugin.ProjectRegistrationProvider.get().registration_date(self), last_updated_dt=self.last_updated, removal_changed_date_dt=self.removal_changed_date, + name_s=self.name, + shortname_s=self.shortname, + neighborhood_name_s=self.neighborhood.name, + external_homepage_s=self.external_homepage, # 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, - neighborhood_name_t=self.neighborhood.name) + ) if self.category: fields.update(category_name_t=self.category.name, category_description_t=self.category.description) http://git-wip-us.apache.org/repos/asf/allura/blob/36627251/Allura/allura/tests/model/test_project.py ---------------------------------------------------------------------- diff --git a/Allura/allura/tests/model/test_project.py b/Allura/allura/tests/model/test_project.py index 2867327..20aa059 100644 --- a/Allura/allura/tests/model/test_project.py +++ b/Allura/allura/tests/model/test_project.py @@ -104,7 +104,6 @@ def test_project_index(): assert 'deleted_b' in idx assert 'private_b' in idx assert 'neighborhood_id_s' in idx - assert 'category_id_s' in idx assert 'short_description_t' in idx assert 'url_s' in idx