bgneal@323: """ bgneal@323: Haystack search index for the Yahoo Group archives application. bgneal@323: bgneal@323: """ bgneal@753: from haystack import indexes bgneal@323: bgneal@943: from custom_search.fields import MaxTermSizeCharField bgneal@323: from ygroup.models import Post bgneal@323: bgneal@323: bgneal@753: class PostIndex(indexes.SearchIndex, indexes.Indexable): bgneal@943: text = MaxTermSizeCharField(document=True, use_template=True) bgneal@753: pub_date = indexes.DateTimeField(model_attr='creation_date') bgneal@753: bgneal@753: def get_model(self): bgneal@753: return Post bgneal@323: bgneal@323: def get_updated_field(self): bgneal@323: return 'creation_date' bgneal@323: