bgneal@224: """Haystack search index for the news application.""" bgneal@224: from haystack.indexes import * bgneal@224: from haystack import site bgneal@392: from queued_search.indexes import QueuedSearchIndex bgneal@392: bgneal@224: from podcast.models import Item bgneal@224: bgneal@224: bgneal@392: class ItemIndex(QueuedSearchIndex): 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)