kopia lustrzana https://github.com/wagtail/wagtail
Updates to docs for new database search backend
A more detailed comparison of the features supported in different databases will come later.pull/7588/head
rodzic
121212c6d0
commit
e2ddd52030
|
@ -71,7 +71,7 @@ update_index
|
|||
|
||||
$ ./manage.py update_index [--backend <backend name>]
|
||||
|
||||
This command rebuilds the search index from scratch. It is not required when using the database search backend (``wagtail.search.backends.db``).
|
||||
This command rebuilds the search index from scratch.
|
||||
|
||||
It is recommended to run this command once a week and at the following times:
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ You can configure which backend to use with the ``WAGTAILSEARCH_BACKENDS`` setti
|
|||
|
||||
WAGTAILSEARCH_BACKENDS = {
|
||||
'default': {
|
||||
'BACKEND': 'wagtail.search.backends.db',
|
||||
'BACKEND': 'wagtail.search.backends.database',
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,29 +61,14 @@ Here's a list of backends that Wagtail supports out of the box.
|
|||
Database Backend (default)
|
||||
--------------------------
|
||||
|
||||
``wagtail.search.backends.db``
|
||||
``wagtail.search.backends.database``
|
||||
|
||||
The database backend is very basic and is intended only to be used in development and on small sites. It cannot order results by relevance, severely hampering its usefulness when searching a large collection of pages.
|
||||
.. versionchanged:: 2.15
|
||||
|
||||
It also doesn't support:
|
||||
The default database search backend was changed from ``wagtail.search.backends.db``
|
||||
|
||||
- Searching on fields in subclasses of ``Page`` (unless the class is being searched directly)
|
||||
- :ref:`wagtailsearch_indexing_callable_fields`
|
||||
- Converting accented characters to ASCII
|
||||
|
||||
If any of these features are important to you, we recommend using Elasticsearch instead.
|
||||
|
||||
.. _wagtailsearch_backends_postgresql:
|
||||
|
||||
PostgreSQL Backend
|
||||
------------------
|
||||
|
||||
``wagtail.contrib.postgres_search.backend``
|
||||
|
||||
If you use PostgreSQL for your database and your site has less than
|
||||
a million pages, you probably want to use this backend.
|
||||
|
||||
See :ref:`postgres_search` for more detail.
|
||||
The database search backend searches content in the database using the full text search features of the database backend in use (such as PostgreSQL FTS, SQLite FTS5).
|
||||
This backend is intended to be used for development and also should be good enough to use in production on sites that don't require any Elasticsearch specific features.
|
||||
|
||||
|
||||
.. _wagtailsearch_backends_elasticsearch:
|
||||
|
|
|
@ -66,11 +66,6 @@ The search may not return any results while this command is running, so avoid ru
|
|||
Indexing extra fields
|
||||
=====================
|
||||
|
||||
.. warning::
|
||||
|
||||
Indexing extra fields is only supported by the :ref:`wagtailsearch_backends_elasticsearch` and :ref:`wagtailsearch_backends_postgresql`. Indexing extra fields is not supported by the :ref:`wagtailsearch_backends_database`. If you're using the database backend, any other fields you define via ``search_fields`` will be ignored.
|
||||
|
||||
|
||||
Fields must be explicitly added to the ``search_fields`` property of your ``Page``-derived model, in order for you to be able to search/filter on them. This is done by overriding ``search_fields`` to append a list of extra ``SearchField``/``FilterField`` objects to it.
|
||||
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue