Mercurial > kallithea
diff rhodecode/lib/indexers/__init__.py @ 3062:a08624dd675e beta
Implemented filtering of admin journal based on Whoosh Query language
ref #210
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 05 Dec 2012 21:14:31 +0100 |
parents | 82fb2a161ddf |
children | a5f0bc867edc b76a595b7a5e |
line wrap: on
line diff
--- a/rhodecode/lib/indexers/__init__.py Wed Dec 05 17:32:56 2012 +0100 +++ b/rhodecode/lib/indexers/__init__.py Wed Dec 05 21:14:31 2012 +0100 @@ -35,7 +35,7 @@ from shutil import rmtree from whoosh.analysis import RegexTokenizer, LowercaseFilter, StopFilter -from whoosh.fields import TEXT, ID, STORED, NUMERIC, BOOLEAN, Schema, FieldType +from whoosh.fields import TEXT, ID, STORED, NUMERIC, BOOLEAN, Schema, FieldType, DATETIME from whoosh.index import create_in, open_dir from whoosh.formats import Characters from whoosh.highlight import highlight, HtmlFormatter, ContextFragmenter @@ -89,6 +89,15 @@ CHGSET_IDX_NAME = 'CHGSET_INDEX' +# used only to generate queries in journal +JOURNAL_SCHEMA = Schema( + username=TEXT(), + date=DATETIME(), + action=TEXT(), + repository=TEXT(), + ip=TEXT(), +) + class MakeIndex(BasePasterCommand):