<commit_before>"""Django haystack `SearchIndex` module."""
from pages.models import Page

from haystack.indexes import SearchIndex, CharField, DateTimeField
from haystack import site


class PageIndex(SearchIndex):
    """Search index for pages content."""
    text = CharField(document=True, use_template=True)
    publication_date = DateTimeField(model_attr='publication_date')
<commit_msg>Add a title attribute to the SearchIndex for pages.<commit_after>"""Django haystack `SearchIndex` module."""
from pages.models import Page

from haystack.indexes import SearchIndex, CharField, DateTimeField
from haystack import site


class PageIndex(SearchIndex):
    """Search index for pages content."""
    text = CharField(document=True, use_template=True)
    title = CharField(model_attr='title')
    publication_date = DateTimeField(model_attr='publication_date')

{'fraction_non_alphanumeric': 0.09606481481481481, 'fraction_numerical': 0.0, 'mean_word_length': 6.26890756302521, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4857248', 'n_tokens_mistral': 231, 'n_tokens_neox': 230, 'n_words': 70}