bgneal@224: """Haystack search index for the news application.""" bgneal@224: from haystack.indexes import * bgneal@224: from haystack import site bgneal@469: from custom_search.indexes import CondQueuedSearchIndex bgneal@392: bgneal@224: from podcast.models import Item bgneal@224: bgneal@224: bgneal@467: class ItemIndex(CondQueuedSearchIndex): bgneal@224: text = CharField(document=True, use_template=True) bgneal@224: author = CharField(model_attr='author') bgneal@224: pub_date = DateTimeField(model_attr='pubdate') bgneal@224: bgneal@277: def get_updated_field(self): bgneal@277: return 'update_date' bgneal@277: bgneal@224: bgneal@224: site.register(Item, ItemIndex)