Skip to content

Commit 85f1b87

Browse files
committed
Merge pull request django-haystack#881 from benspaulding/docs/issue-606
Fix documentation regarding ModelSearchIndex to match current behavior
2 parents 2324f8a + 5b3bb01 commit 85f1b87

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/searchindex_api.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,11 +566,11 @@ The ``ModelSearchIndex`` class allows for automatic generation of a
566566

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

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

0 commit comments

Comments
 (0)