mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-05-11 08:43:10 +00:00
Docs fixes
This commit is contained in:
parent
b9c4ecd7b3
commit
072f5c04e0
2 changed files with 8 additions and 6 deletions
|
|
@ -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
|
||||
===============
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue