 from haystack import indexes <EOL> from . models import PressRelease , PressMention <EOL> class PressReleaseIndex ( indexes . SearchIndex , indexes . Indexable ) : <EOL> text = indexes . CharField ( document = True , use_template = True ) <EOL> def get_model ( self ) : <EOL> return PressRelease <EOL> def get_updated_field ( self ) : <EOL> return '<STR_LIT>' <EOL> def index_queryset ( self , using = None ) : <EOL> return self . get_model ( ) . published_objects . all ( ) <EOL> class PressMentionIndex ( indexes . SearchIndex , indexes . Indexable ) : <EOL> text = indexes . CharField ( document = True , use_template = True ) <EOL> publisher = indexes . CharField ( model_attr = '<STR_LIT>' ) <EOL> url = indexes . CharField ( model_attr = '<STR_LIT:url>' ) <EOL> def get_model ( self ) : 
 return PressMention 
 from haystack import indexes <EOL> from . models import PressRelease , PressMention <EOL> class PressReleaseIndex ( indexes . SearchIndex , indexes . Indexable ) : <EOL> text = indexes . CharField ( document = True , use_template = True ) <EOL> def get_model ( self ) : <EOL> return PressRelease <EOL> def get_updated_field ( self ) : <EOL> return '<STR_LIT>' <EOL> def index_queryset ( self , using = None ) : <EOL> return self . get_model ( ) . published_objects . all ( ) <EOL> class PressMentionIndex ( indexes . SearchIndex , indexes . Indexable ) : <EOL> text = indexes . CharField ( document = True , use_template = True ) <EOL> publisher = indexes . CharField ( model_attr = '<STR_LIT>' ) <EOL> url = indexes . CharField ( model_attr = '<STR_LIT:url>' ) <EOL> def get_model ( self ) : <EOL> return PressMention <EOL> def get_updated_field ( self ) : <EOL> return '<STR_LIT>' <EOL> def index_queryset ( self , using = None ) : <EOL> return self . get_model ( ) . published_objects . all ( ) </s>
