From d637f2c39367b734034b9a425b9bf267c17a2792 Mon Sep 17 00:00:00 2001 From: Ian Stride Date: Thu, 4 Jul 2024 15:48:26 +0100 Subject: [PATCH] Update documentation --- docs/elasticsearch.md | 11 +++++++---- iogt/settings/base.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/elasticsearch.md b/docs/elasticsearch.md index c0c7288b0..59167da8a 100644 --- a/docs/elasticsearch.md +++ b/docs/elasticsearch.md @@ -1,6 +1,8 @@ # Overview -Wagtail supports the use of Elasticsearch as a search backend, to speed up searches and remove the burden of searching from the relational database. +Wagtail supports the use of a relational database or Elasticsearch as a search backend. A relational database is sufficient for simple search queries and sites that do not require high performance. Elasticsearch allows the search capability to be scaled up and removes the burden of searching from the relational database. + +By default, the relational database backend is used and there is no need for further configuration. The rest of this guide will explain how to set up Elasticsearch as a search backend. # Setup @@ -15,7 +17,6 @@ The outline of the setup process is as follows. Create the file `docker-compose.override.yml`. Add the following to the file. ```yaml -version: '3' services: search: image: docker.elastic.co/elasticsearch/elasticsearch:7.12.1 @@ -29,7 +30,7 @@ volumes: search: ``` -If you already have a `docker-compose.override.yml`, you will need to merge the snippet above into it, in which case, you will probably not need the first two lines. +If you already have a `docker-compose.override.yml`, you will need to merge the snippet above into it. ## Configure Wagtail to use Elasticsearch @@ -60,5 +61,7 @@ To create and subsequently update the ElasticSearch index. docker compose run --rm django python manage.py update_index ``` +If the search function does not return any results for any search, it may be necessary to update the index. This applies whether or not Elasticsearch is used. + -[search backends]: https://docs.wagtail.org/en/v2.15.6/topics/search/backends.html +[search backends]: https://docs.wagtail.org/en/v3.0.3/topics/search/backends.html diff --git a/iogt/settings/base.py b/iogt/settings/base.py index be8d6aa6b..cce5e6cdb 100644 --- a/iogt/settings/base.py +++ b/iogt/settings/base.py @@ -518,7 +518,7 @@ 'TIMEOUT': CACHE_TIMEOUT, 'KEY_PREFIX': f'{KEY_PREFIX}_default', }, - # https://docs.wagtail.org/en/v2.15.6/advanced_topics/performance.html#caching-image-renditions + # https://docs.wagtail.org/en/v3.0.3/advanced_topics/performance.html#caching-image-renditions 'renditions': { 'BACKEND': CACHE_BACKEND, 'LOCATION': CACHE_LOCATION,