<commit_before>******
Search
******

To enable search in Comics you need to install ``django-haystack`` and
setup one of their support `search backends
<http://docs.haystacksearch.org/1.0/installing_search_engines.html>`_.
Consult the `haystack documentation <http://docs.haystacksearch.org/1.0>`_
for information about further settings.

Furthermore ``INSTALLED_APPS`` needs to contain ``haystack`` and ``comics.search``.

Solr
====

Solr needs to be setup with at ``schema.xml`` that knows about the Comics
image model. This file can be created by running ``./manage.py build_solr_schema``.

``./manage.py update_index`` can be run for initial indexing. Subsequent indexing
should be done from cron with for instance ``./manage.py update_index --age=HOURS``,
where ``HOURS`` should be replaced according with how often you reindex.<commit_msg>docs: Prettyify search docs<commit_after>******
Search
******

To enable search in *comics* you need to install ``django-haystack`` and
setup one of their support `search backends
<http://docs.haystacksearch.org/1.0/installing_search_engines.html>`_.
Consult the `Haystack documentation <http://docs.haystacksearch.org/1.0>`_
for information about further settings.

Furthermore ``INSTALLED_APPS`` needs to contain ``haystack`` and
``comics.search``. E.g. in your ``comics/settings/local.py``, add::

    from comics.settings.base import INSTALLED_APPS
    INSTALLED_APPS += ('haystack', 'comics.search')


Solr schema
===========

Solr needs to be setup with at ``schema.xml`` that knows about the Comics
image model. This file can be created by running::

    python manage.py build_solr_schema


Indexing
========

For initial indexing, run::

    python manage.py update_index

Subsequent indexing should be done from ``cron`` with for instance::

    python manage.py update_index --age=HOURS

where ``HOURS`` should be replaced according with how often you reindex.
{'fraction_non_alphanumeric': 0.12317327766179541, 'fraction_numerical': 0.0041753653444676405, 'mean_word_length': 4.916666666666667, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '5170474', 'n_tokens_mistral': 600, 'n_tokens_neox': 543, 'n_words': 209}