Docs fixes

This commit is contained in:
Karl Hobley 2014-07-09 16:07:53 +01:00
parent b9c4ecd7b3
commit 072f5c04e0
2 changed files with 8 additions and 6 deletions

View file

@ -11,6 +11,8 @@ Wagtail can degrade to a database-backed text search, but we strongly recommend
.. _Elasticsearch: http://www.elasticsearch.org/
.. _wagtailsearch_backends_database:
Database Backend
===============

View file

@ -87,7 +87,7 @@ Indexing callables and other attributes
.. note::
This is not supported in the `Database Backend`_
This is not supported in the :ref:`wagtailsearch_backends_database`
Search/filter fields do not need to be Django fields, they could be any method or attribute on your class.
@ -134,12 +134,12 @@ To do this, inherit from ``indexed.Indexed`` and add some ``search_fields`` to t
published_date = models.DateTimeField()
search_fields = [
SearchField('title', partial_match=True, boost=10),
SearchField('get_genre_display'),
indexed.SearchField('title', partial_match=True, boost=10),
indexed.SearchField('get_genre_display'),
FilterField('genre'),
FilterField('author'),
FilterField('published_date'),
indexed.FilterField('genre'),
indexed.FilterField('author'),
indexed.FilterField('published_date'),
]
# As this model doesn't have a search method in its QuerySet, we have to call search directly on the backend