Mercurial > kallithea
diff rhodecode/lib/indexers/__init__.py @ 2642:88b0e82bcba4 beta
rename changeset index key to match raw_id rather than path for greater consistency
author | Indra Talip <indra.talip@gmail.com> |
---|---|
date | Sat, 21 Jul 2012 06:01:32 +0200 |
parents | 5f21a9dcb09d |
children | 2ad50c44b025 |
line wrap: on
line diff
--- a/rhodecode/lib/indexers/__init__.py Sat Jul 21 01:28:22 2012 +0200 +++ b/rhodecode/lib/indexers/__init__.py Sat Jul 21 06:01:32 2012 +0200 @@ -73,7 +73,7 @@ FRAGMENTER = ContextFragmenter(200) CHGSETS_SCHEMA = Schema( - path=ID(unique=True, stored=True), + raw_id=ID(unique=True, stored=True), revision=NUMERIC(unique=True, stored=True), last=BOOLEAN(), owner=TEXT(), @@ -209,15 +209,15 @@ def get_full_content(self, docid): res = self.searcher.stored_fields(docid[0]) log.debug('result: %s' % res) - full_repo_path = jn(self.repo_location, res['repository']) - f_path = res['path'].split(full_repo_path)[-1] - f_path = f_path.lstrip(os.sep) - res.update({'f_path': f_path}) - if self.search_type == 'content': + full_repo_path = jn(self.repo_location, res['repository']) + f_path = res['path'].split(full_repo_path)[-1] + f_path = f_path.lstrip(os.sep) content_short = self.get_short_content(res, docid[1]) res.update({'content_short': content_short, - 'content_short_hl': self.highlight(content_short)}) + 'content_short_hl': self.highlight(content_short), + 'f_path': f_path + }) elif self.search_type == 'message': res.update({'message_hl': self.highlight(res['message'])})