comments.search_indexes module

class comments.search_indexes.CommentIndex[source]

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

text = <haystack.fields.CharField object>
authors = <haystack.fields.CharField object>
date = <haystack.fields.DateTimeField 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 = {'authors': <haystack.fields.CharField object>, 'date': <haystack.fields.DateTimeField object>, 'text': <haystack.fields.CharField object>}
objects = <haystack.manager.SearchIndexManager object>