theses.search_indexes module

class theses.search_indexes.ThesisIndex[source]

Bases: haystack.indexes.SearchIndex, haystack.constants.Indexable

text = <haystack.fields.CharField object>
authors = <haystack.fields.CharField object>
supervisor = <haystack.fields.CharField object>
date = <haystack.fields.DateTimeField object>
abstract = <haystack.fields.CharField object>
get_updated_field()[source]

Get the field name that represents the updated date for the model.

If specified, this is used by the reindex command to filter out results from the QuerySet, enabling you to reindex only recent records. This method should either return None (reindex everything always) or a string of the Model’s DateField/DateTimeField name.

get_model()[source]

Should return the Model class (not an instance) that the rest of the SearchIndex should use.

This method is required & you must override it to return the correct class.

index_queryset(using=None)[source]

Used when the entire index for model is updated.

fields = {'abstract': <haystack.fields.CharField object>, 'authors': <haystack.fields.CharField object>, 'date': <haystack.fields.DateTimeField object>, 'supervisor': <haystack.fields.CharField object>, 'text': <haystack.fields.CharField object>}
objects = <haystack.manager.SearchIndexManager object>