Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation regarding ModelSearchIndex to match current behavior #881

Merged
merged 1 commit into from Oct 17, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/searchindex_api.rst
Expand Up @@ -566,11 +566,11 @@ The ``ModelSearchIndex`` class allows for automatic generation of a

With the exception of the automated introspection, it is a ``SearchIndex``
class, so all notes above pertaining to ``SearchIndexes`` apply. As with the
``ModelForm`` class in Django, it employs an inner class called ``Meta``,
which should either contain a ``pass`` to include all fields, a ``fields`` list
to specify a whitelisted set of fields or ``excludes`` to prevent certain fields
from appearing in the class. Unlike ``ModelForm``, you should **NOT** specify
a ``model`` attribute, as that is already handled when registering the class.
``ModelForm`` class in Django, it employs an inner class called ``Meta``, which
should contain a ``model`` attribute. By default all non-relational model
fields are included as search fields on the index, but fields can be restricted
by way of a ``fields`` whitelist, or excluded with an ``excludes`` list, to
prevent certain fields from appearing in the class.

In addition, it adds a `text` field that is the ``document=True`` field and
has `use_template=True` option set, just like the ``BasicSearchIndex``.
Expand Down