Mercurial > public > sg101
comparison gpp/podcast/search_indexes.py @ 392:79240675b903
For #178; using the queued_search app to update the search index. Installed redis and dependencies.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 23 Mar 2011 02:02:44 +0000 |
parents | d424b8bae71d |
children | b910cc1460c8 |
comparison
equal
deleted
inserted
replaced
391:0398aae48807 | 392:79240675b903 |
---|---|
1 """Haystack search index for the news application.""" | 1 """Haystack search index for the news application.""" |
2 from haystack.indexes import * | 2 from haystack.indexes import * |
3 from haystack import site | 3 from haystack import site |
4 from queued_search.indexes import QueuedSearchIndex | |
5 | |
4 from podcast.models import Item | 6 from podcast.models import Item |
5 | 7 |
6 | 8 |
7 class ItemIndex(SearchIndex): | 9 class ItemIndex(QueuedSearchIndex): |
8 text = CharField(document=True, use_template=True) | 10 text = CharField(document=True, use_template=True) |
9 author = CharField(model_attr='author') | 11 author = CharField(model_attr='author') |
10 pub_date = DateTimeField(model_attr='pubdate') | 12 pub_date = DateTimeField(model_attr='pubdate') |
11 | 13 |
12 def get_updated_field(self): | 14 def get_updated_field(self): |