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