diff --git a/rhodecode/lib/indexers/__init__.py b/rhodecode/lib/indexers/__init__.py --- a/rhodecode/lib/indexers/__init__.py +++ b/rhodecode/lib/indexers/__init__.py @@ -74,6 +74,7 @@ FRAGMENTER = ContextFragmenter(200) CHGSETS_SCHEMA = Schema( raw_id=ID(unique=True, stored=True), + date=NUMERIC(stored=True), last=BOOLEAN(), owner=TEXT(), repository=ID(unique=True, stored=True), diff --git a/rhodecode/lib/indexers/daemon.py b/rhodecode/lib/indexers/daemon.py --- a/rhodecode/lib/indexers/daemon.py +++ b/rhodecode/lib/indexers/daemon.py @@ -196,6 +196,7 @@ class WhooshIndexingDaemon(object): writer.add_document( raw_id=unicode(cs.raw_id), owner=unicode(repo.contact), + date=cs._timestamp, repository=safe_unicode(repo_name), author=cs.author, message=cs.message, diff --git a/rhodecode/lib/vcs/backends/git/changeset.py b/rhodecode/lib/vcs/backends/git/changeset.py --- a/rhodecode/lib/vcs/backends/git/changeset.py +++ b/rhodecode/lib/vcs/backends/git/changeset.py @@ -60,6 +60,10 @@ class GitChangeset(BaseChangeset): getattr(self._commit, self._date_tz_property)) @LazyProperty + def _timestamp(self): + return getattr(self._commit, self._date_property) + + @LazyProperty def status(self): """ Returns modified, added, removed, deleted files for current changeset diff --git a/rhodecode/lib/vcs/backends/hg/changeset.py b/rhodecode/lib/vcs/backends/hg/changeset.py --- a/rhodecode/lib/vcs/backends/hg/changeset.py +++ b/rhodecode/lib/vcs/backends/hg/changeset.py @@ -52,6 +52,10 @@ class MercurialChangeset(BaseChangeset): return date_fromtimestamp(*self._ctx.date()) @LazyProperty + def _timestamp(self): + return self._ctx.date()[0] + + @LazyProperty def status(self): """ Returns modified, added, removed, deleted files for current changeset